Stop shipping WebP as your default in 2026: AVIF was 12–43% smaller on every photo we tested
DEV Community

Stop shipping WebP as your default in 2026: AVIF was 12-43% smaller on every photo we tested

A web performance hot take: WebP is still the default format in most image pipelines, and in 2026 that leaves bytes on the table. AVIF beat WebP on every photo we encoded.

WebP should be your fallback, not your first choice.

The numbers

Same engine, Auto quality, three photos:

  • Photo-like test image, 1920 × 1280: WebP 218.9 KB, AVIF 123.9 KB. AVIF is 43% smaller.
  • Hero photo, 1920 × 1076: WebP 85.5 KB, AVIF 69.3 KB. AVIF is 19% smaller.
  • Camera photo, full 4964 × 2782: WebP 329 KB, AVIF 288 KB. AVIF is 12% smaller.

"But support"

That's no longer an argument. caniuse puts AVIF at 95.35% of users and WebP at 96.74% (August 2026 data). That's a 1.4-point gap, and <picture> covers it with a fallback.

Yet the 2025 Web Almanac found only 0.7% of LCP images in AVIF. The format is ready. Our pipelines aren't.

Where WebP still wins (be honest about it)

  • Flat graphics. On a simple 640 × 480 flat-colour PNG, WebP wrote 0.2 KB and AVIF wrote 0.8 KB. For logos, icons and UI art, WebP lossless or SVG wins.
  • Encode time. AVIF is slower. On our server, one 9.1 MP iPhone photo took 1.36 s at effort 3 and 2.44 s at effort 4. Cloudflare's docs say AVIF encoding "can be an order of magnitude slower". Encode once at upload or build time and cache it. Don't encode per request.
  • Quality numbers don't transfer. AVIF q80 is not WebP q80. Copy your WebP setting over and you can end up with a bigger file. Tune AVIF on its own scale.

What a sane default looks like

<picture>
  <source type="image/avif" srcset="photo-800.avif 800w, photo-1600.avif 1600w" sizes="100vw">
  <source type="image/webp" srcset="photo-800.webp 800w, photo-1600.webp 1600w" sizes="100vw">
  <img src="photo-1600.jpg" width="1600" height="900" alt="..." loading="lazy">
</picture>

Photos: AVIF first, WebP second, JPEG last. Flat art: SVG or lossless WebP.

Change my mind. What's actually stopping you from making AVIF the default: encode time, your CDN, your CMS, or something else?

Method and full comparison: https://blinkimg.com/blog/avif-vs-webp-vs-jpeg?utm_source=devto&utm_medium=social&utm_campaign=stop-webp-default

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.