Skip to content

image guide

Animated Images Explained: Choosing GIF, APNG, Animated WebP and AVIF

There are now four serious formats for an animated image, and the 20-year-old default most sites still use is the worst of them for everything except one property: paste-ability. Animated WebP and APNG carry millions of colours and real alpha at a fraction of a GIF's weight; animated AVIF beats both again but ships with support caveats. This guide is the decision matrix — size, transparency, browser coverage, and the tools that convert between all four — plus why 'just use a video' is usually the correct answer with an awkward PR problem.

Updated September 22, 2026 · 12 questions answered

Key takeaways

  • For a website you control: muted autoplaying video (MP4/WebM) beats every animated image format on size; animated WebP is the image-format runner-up; GIF is for pasting into places you do not control.
  • Animated GIF's real limits: 256 colours per frame and binary transparency — the grainy edges and dithered skies around an animated overlay are the format, not your export settings.
  • APNG fixes colour and alpha while keeping the .png filename ecosystem; animated WebP adds 30-60% smaller files; animated AVIF is smallest again but has the newest support curve.
  • Browser support in 2026: APNG is universal on modern browsers (Safari's long support is the surprise), animated WebP is broad, animated AVIF is the frontier — test before committing.
  • Conversion between animated formats decodes every frame and re-encodes honestly — converting GIF to anything only improves; the reverse always costs.

The Four Contenders

GIF is the 1987 original and still the only format with zero-friction playback everywhere: email clients (some), forums, chat apps, every browser since Netscape. Its price: a 256-colour palette per frame and one-bit transparency, which is why photographic animations get dithered and soft-edged overlays get haloed.

APNG is the quiet 2008 answer — a full-colour, full-alpha animation inside a .png file, with the neat property that old PNG decoders display its first frame as a perfectly good still. Safari has supported it since 2020 and Chrome/Firefox long before; it is the safe modern default when you want animated-PNG semantics without WebP's format politics.

Animated WebP adds real compression between frames (the video-codec trick) — typically 30-60% lighter than the GIF of the same animation — with full alpha and 24-bit colour, and is supported by every current browser. It is the practical workhorse for website animation today.

Animated AVIF is newest and smallest again (AV1's inter-frame prediction), with HDR-capable frames; support is the usual early-adopter curve — current Chrome and Firefox yes, Safari's animated support is the laggard to verify. Use where you control the audience and the byte savings are the point.

The Fifth Option: Not an Image

The engineering answer to 'animated image on my site' is almost always a muted, looping, autoplaying <video> — and the size difference is not marginal: a 2 MB animation is a 200-400 KB MP4 of the same clip, because the video codecs have ten more years of motion-compression research behind them than any image format. The cost is that a video tag is a media pipeline, not an image resource — it cannot sit in a markdown badge, an email, a CSS background, or a forum signature.

The decision is therefore about control of the destination: your own website, video first, animated WebP second; anywhere you do not control the consumer, GIF, because a format that autoplays everywhere beats a format five times smaller that does not play at all. The paste-ability property is worth more than bytes in exactly the contexts you cannot audit.

Converting Between Them

Downgrading (anything to GIF) costs colour depth and alpha fidelity — the export dialog's dithering choice is then your main quality lever, and for photographic content, no dither with the full 256-colour palette often beats heavy dither.

Upgrading GIF to WebP or APNG is honest: the decoder reads every frame's pixels and the new encoder stores them at full depth — the extra colour precision does not invent quality but it does stop the further loss, and the file shrinks because WebP and APNG encode those pixels better. The one trap: GIF timing quirks (per-frame delays, the 2-centisecond rounding, disposal-method glitches) need to survive the decode or the converted animation's rhythm changes; good converters read frame delays, and comparing playback at 1x after conversion is the whole QA step.

From video, the conversion path is the frame-extraction pipeline — pick the window, the rate and the canvas size before encoding, because those three knobs decide whether the animation is 300 KB or 8 MB (the GIF-making guide covers the settings; they apply to every output format, with the frame-rate advice slightly relaxed for WebP and AVIF, which tolerate 15-20 fps better than GIF does).

The Support-and-Fallback Pattern

For critical animation on a site, the <picture>-equivalent for motion is progressive: a static first frame that works in any case (APNG's first-frame property is exactly this), an animated WebP or AVIF layer where supported, and the GIF where neither — a decision most sites never need because animated WebP's coverage is effectively universal on current browsers.

One accessibility note that real audits check: looping animation is a vestibular and attention hazard, and the WCAG bar is a pause/stop control for anything that moves for more than five seconds. The autoplay-video pattern dodges nothing — respect prefers-reduced-motion with a media query and serve the static frame; it is two lines of CSS and the difference between polished and hostile.

Frequently asked questions

The questions people ask most about animated images for the web: gif vs apng vs webp vs avif, answered directly.

What is the best animated image format for websites?

On a site you control, a muted looping <video> is smallest; among image formats, animated WebP is the 2026 default — full colour, full alpha, broad support, 30-60% smaller than GIF. APNG when you want PNG semantics with first-frame fallback, AVIF only when you have checked support.

Is APNG better than GIF?

In every technical dimension — 24-bit colour vs 256, full alpha vs on/off, better compression — but not in distribution: many chat apps, forums and older tools still choke on APNG, which is why GIF survives as the universal paste target.

How do I make an animated WebP?

From video: trim to a loop, set dimensions and 10-20 fps, and convert with the video-to-GIF family of tools (choosing WebP as output where offered). From frames: assemble in the image-to-GIF path with WebP output. Lossless WebP keeps exact frames; lossy cuts bytes with soft artefacts.

Why is my GIF transparent area checkered?

Because GIF's binary transparency composited wrong in the viewer, or the frame carries a colour-keyed transparency that the converter mishandled. The clean fix is converting to APNG or animated WebP, which store real alpha per pixel — the halo and keying problems are format artefacts, not your art.

Is animated AVIF worth using?

If you control the audience and the file count is big enough for the 30-50% saving over WebP to pay for itself — a heavy-animation homepage qualifies, a single loader icon does not. Verify Safari behaviour for your build before committing to it as the only layer.

How do I reduce an animated GIF size?

In order of impact: shorten the loop, shrink dimensions to 480 px or less, drop frame rate to 10-15, then reduce the palette to what the frames actually use. A three-colour logo animation at 240 px is a 40 KB GIF; the same idea at 800 px and 30 fps is the 12 MB email-bouncer.

Do animated PNGs work in email?

Apple Mail and a few others render APNG; Outlook ignores them and shows the static first frame. For email animation the reliable pattern remains GIF, or a static image plus a linked page — the format's universal support ends exactly where email-client support begins.

Can I convert GIF to animated WebP without quality loss?

Losslessly, yes — WebP lossless mode encodes the exact decoded frames, and because WebP has no palette limit, the conversion can also remove GIF's per-frame 256-colour constraint. The result is smaller and strictly no worse.

What is the difference between APNG and animated PNG?

Nothing in practice — APNG is the standard name for PNG's animation extension, shipped since Safari 3 and now universal. 'Animated PNG' in file-picker labels is almost always an APNG.

Why does my converted animation play at the wrong speed?

Frame delays. GIF stores per-frame delays in hundredths of a second; a conversion pipeline that flattens them to one value changes the rhythm. Check playback against the original at 1x — a speed difference is a metadata reading issue, and good tools preserve per-frame delays.

Should I use video instead of animated images?

For a website, almost always: a 2 MB animated GIF is a 300 KB looping MP4 of the same motion. The animated-image formats earn their place where embeds must be images: markdown, CSS backgrounds, email signatures, chat paste, and surfaces without a video element.

How do I make animation accessible?

Provide a pause control for loops longer than five seconds (WCAG 2.2.2), respect prefers-reduced-motion by swapping to a static frame via CSS, and keep the animation decorative (empty alt) rather than content-bearing — movement that carries meaning needs an accessible alternative that does not move.