GIF, WebP, APNG,
and Which to Use.
GIF dates from 1987, is capped at 256 colors, and is still the default for a looping clip. WebP and APNG hold full color and work in every current browser. Each one fits a different place.
The Formats, Measured
| Format | Colors | Alpha | The Sample |
|---|---|---|---|
| GIF | 256 per frame | 1 bit, on or off | 110 KB |
| WebP | Full 24 bit | 8 bit, smooth | 82 KB lossless, 173 KB lossy |
| APNG | Full 24 bit | 8 bit, smooth | 96 KB |
| MP4 (H.264) | Full 24 bit | None | 294 KB at 1280 × 720 |
The sample is a 4.2 second screen recording of an invoicing app, made in the GIF Maker at 600 × 338 and 15 frames a second. The GIF is its Email export. The lossless WebP and the APNG hold the same frames as the GIF, pixel for pixel. The lossy WebP is quality 75, made from the full color video. The MP4 is Turn Into MP4 at 720p, the smallest size it offers.
The WebP files were made with Google’s libwebp tools. The APNG was made with each frame cropped to what changed, the way the GIF is.
On a screen recording of flat interface color, the image formats land close together, because each frame only redraws what changed. A gradient or camera video is where GIF falls behind: 256 colors cannot describe a gradient, so the encoder has to dither, and the noise that adds compresses badly.

Why GIF Banding Happens
A GIF holds a palette of at most 256 colors per frame. Encoding picks the best 256 for your clip and maps every pixel to the nearest one. On a photograph or a gradient the nearest is often visibly wrong, which is the banding you see.
Dithering scatters the error across neighboring pixels so the eye averages it out. It looks better, and it makes the file larger, because the noise breaks up the repeated patterns that GIF’s LZW compression relies on. That trade is one of the biggest levers on GIF file size.
Compatibility in 2026
Animated WebP works in every current browser and in most messaging apps. It fails in older desktop image viewers and in some email clients.
APNG works in every current browser too. Software that does not understand the animation shows the first frame as a normal PNG.
GIF works everywhere, which is the main reason to still use it. If the clip is going into a README, a support ticket, an older chat client, or an email, GIF is the safe choice.
GitHub takes GIF and MP4 but not WebP or APNG. Its file types for issues, pull requests, and comments are PNG, GIF, JPEG, SVG, MP4, MOV, and WebM, with images and GIFs up to 10 MB (GitHub Docs).
When to Use a Video Instead
Past about 10 seconds, or with camera video in it, a GIF is the wrong tool. A video codec reuses earlier frames and stores only what changes, in full color. In web.dev’s example, a 3.7 MB GIF became a 551 KB MP4. On a short screen recording the gap is small: the sample’s MP4 is 294 KB against the GIF’s 110 KB, with more than four times the pixels.
The cost is that video needs a player and does not autoplay everywhere. On the web, a muted, looping, inline <video> autoplays in every browser and behaves like an animated image.
<video autoplay loop muted playsinline>
<source src="demo.mp4" type="video/mp4">
</video>
All four attributes matter. Without muted and playsinline, iOS Safari refuses to autoplay and opens the video fullscreen instead.
Getting the Size Down
In order of how much they save for how little they cost, with the GIF Maker control for each:
- Cut the frame rate with Smoothness. Twelve to fifteen frames a second is fine for interface capture.
- Crop to what matters with Crop. Half the pixels is half the work in every frame.
- Trim the clip. The first and last second rarely show anything useful.
- Pick Fewer in Colors before you reach for dithering.
- Leave Dither off if the content is flat color.
- For a long clip, use Turn Into MP4.
A Rule of Thumb
README, issue, chat, or email: GIF, under about 10 seconds. A web page you control: an MP4 in a muted, looping video, or WebP if it has to be an image. A short animation that needs smooth see-through edges: APNG. Anything longer, or anything with camera video in it: MP4.