Compression and quality
AVIF is the better compressor, especially at low bitrates and on photographic content: it keeps texture where WebP smooths it away. At the quality levels most websites use (roughly q75–q85 equivalents), the gap narrows to about 10–20% in favour of AVIF. On sharp graphics with text, WebP frequently matches or beats AVIF because AVIF's filtering can soften fine lines.
Speed and cost
WebP encodes in milliseconds, which is why it can run in your browser. AVIF at good quality takes 10–100× longer per image and needs serious CPU on the server. Decoding also costs more: on older Android phones, AVIF-heavy pages can actually feel slower despite smaller downloads. If your images are generated on the fly, WebP is far cheaper to operate.
Support in the real world
Browser support for AVIF became solid in 2023 (Safari 16.4, Edge 121). But browsers are only part of the story: WordPress added AVIF uploads only in 6.5 (2024), many image CDNs charge extra for it, email clients ignore it, and design tools often cannot open it. WebP has had a decade to become boring, which is exactly what you want from an image format.
Recommended strategy
- Convert all published images to WebP today; this alone captures most of the performance gain.
- If you run a build pipeline or image CDN, add AVIF as the first
<source>in<picture>with WebP second and JPEG last. - Always send correct
width/heightattributes and useloading="lazy"below the fold.