The GIF format
Technically obsolete for almost everything, and still culturally unavoidable.
What is GIF?
GIF dates from 1987 and carries a hard constraint from that era: a maximum of 256 colours per frame, chosen from a palette stored in the file. For a photograph this is disastrous — smooth gradients become visible bands.
It survived because it was the first widely supported format that could animate, and because animation in a plain <img> tag required nothing else. That convenience outlived the format’s technical merits by about two decades.
Its transparency is also primitive: one palette entry is either fully transparent or not, so there is no anti-aliasing against the background and cut-outs get hard, jagged edges.
Common uses
- Short looping animations and reaction clips
- Simple UI animations and loading indicators
- Legacy assets that predate better options
Advantages
- Animation works everywhere with no player or extra markup
- Universally supported since the 1990s
- Lossless within its 256-colour palette
- Simple, well-understood format
Limitations
- 256 colours per frame, which ruins photographic content
- Very large files compared to video for the same animation
- Binary transparency only — no soft edges
- No sound, and no meaningful quality control
Browser support
Universal, including animation. For new work, an MP4 or WebM video is usually 10× smaller for the same clip, and animated WebP is a better fit where a plain image element is required.