Why are GIF files so big?
2 min read
It is surprising how a three-second GIF can weigh more than a minute of video. The reason is the format’s age.
The format was designed in 1987
GIF was created for still images on slow connections. Animation was added later, and the format never gained modern compression tools:
- Simple LZW compression. Each frame is compressed on its own with a general-purpose algorithm, not one designed for images.
- No motion prediction. Video codecs describe how blocks move between frames. GIF cannot; it can only store the pixels that changed.
- 256 colors per frame. Real footage needs dithering to fake more colors, and dither noise is hard to compress.
- Every pixel is stored. There is no notion of “roughly the same” — unless you use lossy compression.
What makes a particular GIF big
| Factor | Effect on size |
|---|---|
| Dimensions | Grows with pixel area: 2× width and height ≈ 4× size |
| Number of frames | Roughly proportional to length × frame rate |
| Camera motion | Every pixel changes every frame, so nothing can be skipped |
| Noise and dithering | Random-looking pixels compress poorly |
| Flat colors, static background | Compresses very well |
A screen recording of a mostly static interface can be tiny. A handheld phone clip of the same length can be enormous.
How to make it smaller
- Optimize losslessly to keep only the pixels that change.
- Add light lossy compression to tolerate small differences.
- Reduce dimensions to the size it will actually be shown at.
- Shorten it or reduce the frame rate if you can.
GifSmaller applies the first three automatically, in that order, until the GIF reaches your target. For details, read how to make a GIF smaller.
When not to use a GIF
If the destination accepts video — most social networks do, and X converts GIFs to video anyway — MP4 is usually far smaller and better looking. Keep GIF for where it shines: emoji, chat reactions, README files, docs and email, where it plays everywhere without a player.
Try it on your GIF
Compress it in your browser. Free, and nothing is uploaded.
Open the compressor