For the web, animated WebP beats GIF: it carries 24-bit colour and 8-bit alpha transparency, and on our four test clips lossy WebP files were 2.5 to 34 times smaller than the GIFs our encoder made. GIF still wins where it is the only animated format guaranteed to play, which today mostly means email and some chat and social uploads.
Three rules cover most decisions:
- Long or photographic loops on a website: MP4 or WebM video, muted and looping.
- Animated images that need real transparency: animated WebP, or APNG where lossless matters.
- Anywhere only GIF autoplays: GIF, kept as small as the destination allows.
GIF vs WebP vs APNG vs MP4 at a glance
The formats differ in colour depth, transparency, sound and where the file will actually play. Sources for each row are the format specifications and support tables linked below.
| Feature | GIF | Animated WebP | APNG | MP4 (H.264) |
|---|---|---|---|---|
| Colours per frame | Up to 256 (palette) | 24-bit | 24-bit | 24-bit (8 bits per channel) |
| Transparency | 1-bit: one palette entry is fully transparent | 8-bit alpha | 8-bit alpha | None |
| Compression | Lossless within the palette (LZW), each frame on its own | Lossy or lossless, chosen per frame | Lossless (PNG) | Lossy, motion-compensated |
| Sound | No | No | No | Yes |
| Looping | Loop count in the file | Loop count in the file (0 = forever) | Play count in the file | Set by the player, such as the HTML loop attribute |
| Browsers | All | All current (caniuse: 96.8% of users) | All current (caniuse: 96.6% of users) | All |
| Most clients; Outlook for Windows 2007–2019 shows a still | Shown by most clients; Gmail converts it to JPG and does not animate it | First frame where unsupported | Few clients play video | |
| Fixed-camera test clip | 2,042 KB (176 KB optimised) | 60 KB lossy / 322 KB lossless | 635 KB | 59 KB |
Measured file sizes on the same clips
We generated four seeded 3-second clips at 480 × 270 and 15 fps: flat UI graphics, a textured scene with a fixed camera, the same scene with a camera pan, and the fixed scene with film grain. The GIFs come from Playcut's browser GIF engine; every other file was encoded by ffmpeg 7.1.1 from the same raw frames.
| Format | Flat UI | Fixed camera | Camera pan | Film grain |
|---|---|---|---|---|
| GIF (Playcut encoder, 256 colours) | 85 KB | 2,042 KB | 2,064 KB | 3,090 KB |
| GIF, unchanged pixels skipped | 80 KB | 176 KB | 2,298 KB | 3,352 KB |
| Animated WebP, lossy (quality 75) | 34 KB | 60 KB | 495 KB | 1,130 KB |
| Animated WebP, lossless | 134 KB | 322 KB | 4,481 KB | 5,798 KB |
| APNG | 180 KB | 635 KB | 12,399 KB | 15,004 KB |
| MP4, H.264 (CRF 23) | 12 KB | 59 KB | 71 KB | 1,007 KB |
| WebM, VP9 (CRF 32) | 8 KB | 39 KB | 47 KB | 635 KB |
| MP4, AV1 (CRF 35) | 6 KB | 47 KB | 50 KB | 93 KB |
Sizes in KB (1 KB = 1,024 bytes). Lossy settings are common defaults, not quality-matched, so compare within a column rather than reading them as a quality ranking. The optimised GIF row uses the same GIF library as Playcut's encoder, which does not skip unchanged pixels yet.
Two patterns stand out. Motion and grain separate the formats: on the panning clip APNG reached 12,399 KB while H.264 stayed at 71 KB. And the lossless formats grow fastest as the picture gets busier, from 134 KB (WebP) and 180 KB (APNG) on the flat clip to 5,798 KB and 15,004 KB with grain.
GIF vs WebP
WebP is Google's image format, and its container specification describes it as "supporting lossy and lossless compression, plus features like transparency and animation". Each frame of an animated WebP can be lossy (VP8) or lossless (VP8L), and the animation header stores a loop count where 0 means forever.
GIF is older and narrower. The GIF89a specification of 1990 gives each frame a colour table of at most 256 entries and a single transparent index, so a pixel is either fully shown or fully transparent. That 1-bit transparency is why GIF edges look jagged on a background they were not made for; the transparent GIF maker uses a matte colour to hide the edge on a known background.
Size
Lossy WebP was smaller than our GIF on every clip: 34 times smaller on the fixed-camera scene and 2.5 to 4.2 times smaller on the others. Lossless WebP beat the GIF only on the fixed-camera clip and was larger on the other three, because it keeps full 24-bit colour where the GIF has already thrown colours away.
Converting a finished GIF is less effective than encoding from the source. Running Google's gif2webp tool on the fixed-camera GIF gave 207 KB lossless and 177 KB lossy, against 60 KB for WebP made from the original frames.
Support
Every current browser shows animated WebP; caniuse puts WebP support at 96.8% of users on its August 2026 data, with full Safari support from version 16. Outside the browser the picture changes. X's help centre lists GIF, JPEG and PNG for posts, and Slack's custom emoji take JPG, PNG or GIF, so a WebP will not go where those rules apply.
APNG: the animated PNG nobody talks about
APNG adds animation to PNG with three extra chunks, acTL, fcTL and fdAT. It is no longer an unofficial extension: the PNG Third Edition, a W3C Recommendation dated 24 June 2025, includes it. A decoder that does not understand APNG ignores those chunks and shows the static image.
APNG is lossless with 24-bit colour and 8-bit alpha, so every frame is exact and the files are usually the largest. It was the biggest file on three of our four clips. It plays in all current browsers, and caniuse lists support from Chrome 59, Firefox 3, Safari 8 and Edge 79.
It also has one notable home outside the browser: Discord's sticker guide lists APNG and GIF as the formats for animated stickers. Use APNG for short, crisp animations with soft transparent edges, such as stickers, icons and UI flourishes.
Why MP4 wins for anything long
MP4 wins because its video codec stores most frames as motion plus a small difference from the frames around them, which none of the image formats can do. On our panning clip the H.264 MP4 was 71 KB against 2,064 KB for the GIF and 495 KB for lossy WebP. The longer the clip, the wider that gap gets. The GIF to MP4 converter makes that switch in your browser and keeps the frame timing.
A video can behave like a GIF on a web page. Give the <video> element the autoplay, muted,
loop and playsinline attributes; MDN's
autoplay guide
explains that browsers do not block autoplay for muted media, and that Safari needs playsinline.
The trade-offs are transparency and reach. H.264 MP4 has no alpha channel, so it cannot replace a sticker or an overlay, and most email clients will not play video at all. GIPHY's developer guide makes the same point, recommending WebP for stickers because "MP4 does not support transparency". For the codec side of that story, see what a codec is and how it differs from a container.
Why your GIFs keep downloading as WebP
You click "save image" on a GIF and get a .webp file because the site never sent you the GIF. Browsers advertise the formats they accept in the Accept header of every image request, and a server that sees image/webp there can answer with a WebP copy. MDN calls this content negotiation.
GIF sites do it on purpose. GIPHY's developer documentation offers every GIF as GIF, MP4 and WebP renditions and tells apps: "Use MP4 wherever supported, or WEBP as a fallback. Do not use the GIF format." What you see in the page is often one of those renditions.
To get the real .gif, use the site's own download, share or "copy GIF link" option instead of saving the displayed image. Note that the image converter on this site handles still images only, not animated WebP.
Which format to use where
Websites
Use a muted, looping MP4 or WebM for anything photographic or longer than a couple of seconds, and animated WebP for small animations that need transparency. For still images, the image converter and image compressor make WebP and AVIF files in the browser. The GIF compressor's section on when not to use a GIF at all makes the same case.
Chat apps and social
Follow each platform's upload rules, because they decide more than file efficiency does. X posts and Slack emoji list GIF but not WebP. Discord's emoji guide accepts GIF, WEBP and AVIF, and its stickers take APNG or GIF. The byte limits for each surface, dated and sourced, are in GIF size limits by platform.
To make the GIF itself, the video to GIF converter trims and converts a clip in your browser without uploading it. If the GIF comes out too heavy, why is my GIF so large shows which setting to change first.
GIF is still the safe animated format for email. The caniemail GIF test (last run February 2020) found animated GIFs working across major clients except Outlook for Windows 2007 to 2019, which shows a still. Its WebP test (February 2021) found most clients showing WebP, but Gmail converts it to JPG and neither Gmail nor Windows Mail animates it. Its video test found the video element supported in about a quarter of clients.
Put the key message in the first frame so Outlook readers still get it. If you are generating the loop in the first place, Playcut's app accepts GIF, PNG, JPEG and WebP images and MP4, WebM and MOV video as uploads, and the AI video generator renders a source clip that you can then turn into a GIF.