AVIF vs WebP: which is better in 2026?
On pure compression, AVIF beats WebP — often by a wide margin. Yet most of the web still serves WebP, and for good reasons: encoding speed, tooling maturity and predictability. Here's an honest comparison so you can decide which one your images should use.
The short answer
AVIF produces smaller files; WebP is easier to live with. If your images go through an automated pipeline (a CDN, an image service, a framework that generates both), serve AVIF with a WebP fallback and enjoy the savings. If you're exporting files by hand and uploading them somewhere, WebP remains the pragmatic default in 2026: it encodes in a fraction of the time, opens in more apps, and its quality settings behave more predictably.
Where the two formats come from
Both are image formats extracted from video codecs. WebP (Google, 2010) is based on VP8; AVIF (Alliance for Open Media, finalised 2019) is based on AV1, a codec designed almost a decade later with far more sophisticated prediction, larger block sizes and better entropy coding. That generational gap is exactly why AVIF compresses better — and also why it needs more CPU to do it.
Compression: AVIF wins, clearly
At equivalent visual quality, AVIF files are commonly 20–50% smaller than WebP, and often around half the size of a JPEG. The advantage is largest on photographic content at low-to-medium bitrates: AVIF degrades gracefully, smoothing detail rather than producing the blocky, ringing artifacts JPEG and WebP show when pushed hard. Typical numbers for a 1200×800 photo:
- JPEG, quality 80: ~180 KB
- WebP, quality 80: ~120–140 KB
- AVIF, quality ~60 (roughly equivalent visually): ~70–90 KB
AVIF also supports things WebP can't: 10- and 12-bit colour depth, HDR, and wide-gamut colour. If you're delivering HDR photography, AVIF is the only mainstream option. One niche exception: for lossless compression, WebP's lossless mode is usually smaller and much faster than lossless AVIF — so for pixel-perfect screenshots and UI graphics, lossless WebP still wins.
Encoding speed: WebP wins, clearly
AVIF's efficiency costs CPU time. Depending on encoder settings, AVIF encoding runs anywhere from several times to over ten times slower than WebP. For one image that's irrelevant; for a media library of 50,000 product photos, or an on-the-fly image resizing service, it's a real bill. Decoding is less lopsided — modern devices decode AVIF fast enough that users won't notice — but encode cost is the main reason many pipelines still stop at WebP.
Browser support in 2026
This question is essentially settled now. Chrome has supported AVIF since version 85 (August 2020), Firefox since 93 (October 2021), and Safari since version 16 (September 2022), with support extended across all hardware by Safari 16.4 in early 2023. Edge was the last major holdout, adding AVIF in version 121 (January 2024). Today, all current major browsers render AVIF, with global support comfortably above 90% of traffic. WebP sits a few points higher still (~96%+), since it had a decade's head start — but for both formats, the unsupported remainder is old, largely retired browsers.
Good practice is unchanged: serve modern formats through the <picture> element with a JPEG or PNG <img> fallback, and every visitor gets something.
Tooling and ecosystem
This is where WebP's maturity shows. Practically every image library, CMS, CDN and build tool has had solid WebP support for years. AVIF support is now common in the big tools (sharp/libvips, ImageMagick, ffmpeg, major CDNs, Photoshop 23.5+), but you'll still bump into rough edges: apps that can't open .avif files, upload forms that reject them, thumbnails that don't render in older OS file browsers, and encoder settings whose "quality" numbers don't map intuitively to output. Windows and Android opened AVIF support earlier than Apple; macOS and iOS gained native support with Ventura and iOS 16 in 2022.
So why do sites still serve WebP?
- Encode cost: converting a large back-catalogue to AVIF takes serious compute; WebP conversion is nearly free.
- Pipeline inertia: WebP output has been a checkbox in CMSs and CDNs since ~2019; AVIF arrived later and is sometimes a paid tier.
- Diminishing returns: moving JPEG→WebP saved ~30%. Moving WebP→AVIF saves another ~20–40% on already-small files — worthwhile at scale, less urgent for a small site.
- Predictability: teams know how WebP behaves across their whole image set; AVIF occasionally needs per-image tuning to avoid over-smoothing fine texture.
When AVIF is the right call
Choose AVIF when bandwidth genuinely matters and generation is automated: image-heavy landing pages you're optimising for Core Web Vitals, photography portfolios, e-commerce product grids served through a CDN that negotiates formats, and HDR imagery. Hero images are the classic win — a 250 KB WebP hero that becomes a 140 KB AVIF is a measurable improvement to Largest Contentful Paint on slow connections.
Converting AVIF files
Received an AVIF you need in a more portable format? You can convert AVIF to WebP to keep small file sizes while gaining broader app support, or convert AVIF to JPG when you need a file that opens absolutely anywhere — both converters run entirely in your browser, so the images never leave your device.
Frequently asked questions
Is AVIF always smaller than WebP?
No. For lossy photographic images it almost always is, but for lossless compression WebP typically produces smaller files than lossless AVIF, and does it much faster. Very small images (icons, thumbnails) also show little practical difference once container overhead is counted.
Does Safari support AVIF?
Yes. Safari added AVIF in version 16 (September 2022), initially on newer hardware, and covered all devices with Safari 16.4 in March 2023. Any Mac or iPhone updated in the last few years displays AVIF.
Should I replace all my WebP images with AVIF?
Only if the conversion is automated. The savings are real but incremental, so bulk-re-encoding a library by hand is rarely worth the time. New pipelines should generate both and let the browser pick via <picture> or content negotiation.
What about JPEG XL?
JPEG XL compresses competitively with AVIF and re-compresses old JPEGs losslessly, but browser adoption has been the sticking point — Safari shipped support, while Chrome declined to. Until that changes, AVIF and WebP remain the deployable choices.
Related guides
- WebP vs PNG — the comparison that matters for screenshots, logos and transparency.
- Best image format for the web — a use-case-by-use-case decision guide.