image/gif
imageThe MIME type for GIF images. GIF is a lossless format limited to 256 colors, primarily used for simple animations. For new animated content, WebP (image/webp) and AVIF (image/avif) produce far smaller files with better quality. For static images, PNG is better. GIF remains relevant only for legacy compatibility and social platforms that specifically require it.
Details
GIF (Graphics Interchange Format, 1987) was invented by CompuServe and uses LZW compression limited to 256 colors.
When GIF is still used: - Animated GIFs on platforms that don't accept video (Slack, older messaging apps) - Legacy compatibility requirements - Simple 2-color or low-color animations
When to use alternatives: - New animated content: use <video> (video/webm or video/mp4) or animated WebP - Static images: use PNG (lossless) or WebP (smaller) - Video loop in HTML: <video autoplay loop muted playsinline> is universally better
Size: a 2MB animated GIF is often replaceable with a 200KB video/webm with better quality.
Common use
Legacy animated images, social platform animations (Tenor, Giphy)