AVIF, built on the AV1 video codec, is the newest entry among next-generation image formats, and early comparisons against JPEG and WebP are favorable. Browser support is decent, but encoder and decoder tooling is still on the bleeding edge, and there are a few caveats worth knowing before committing to it.

Small images: WebP can come out ahead

For images with small dimensions, WebP sometimes produces a smaller file than AVIF. Tuning the encoder to handle this case is likely possible but not practical for most teams, who typically turn to a tool like squoosh.app or an image CDN such as ImageEngine.

Broadly, WebP yields larger files than AVIF, and on larger images ImageEngine outperforms squoosh.app by a wide margin. The reversal appears at the small end: around 100px × 100px, squoosh.app beats ImageEngine, and by 80px × 80px WebP is the most efficient format by file size. The result holds fairly consistently across image types; the illustration used here is an image from Picsum.

PixelsOriginal JPEG (bytes)Optimized WebP (bytes)ImageEngine AVIF (bytes)squoosh.app AVIF (bytes)
501,475598888687
802,0901,0761,2341,070
1103,0221,7161,5921,580
1504,4572,8082,1532,275
1705,3003,2242,4502,670
2307,7924,8863,1893,900
29010,8956,7744,0565,130

High-entropy product images and zoomed detail

Product pages typically show an image that zooms on hover or click so shoppers can inspect details. In some cases AVIF reduces the level of detail, or perceived sharpness, when zoomed — particularly on product shots where a blurred, low-entropy background sits behind a detailed, higher-entropy foreground.

The comparison above, a zoomed portion of a larger product image, pits a regularly optimized JPEG against an AVIF produced by squoosh.app. The AVIF file is much lighter, but the quality-for-size trade-off has gone too far. The effect won't be noticeable on every image type, which makes it hard to catch proactively in an automated build that selects formats through responsive images syntax.

AVIF also lacks progressive rendering, which JPEG supports. On a product detail page, progressive rendering can meaningfully improve Largest Contentful Paint and other Core Web Vitals: even if a JPEG takes slightly longer to download because of its larger size, it will likely begin rendering before the AVIF does.

JPEG 2000 as a competing option

AVIF's headline selling point is very low file size at acceptable visual quality, and early coverage has centered on that. But JPEG 2000 (JP2), an older format that receives far less attention, can sometimes do the job better — and Apple's platforms already support it.

Take a 700 × 700 test photo. Optimized with squoosh.app at default settings, the AVIF comes out at 27.9 KB; converted to JPEG 2000 through ImageEngine, the file is 26.7 KB. The gap is small, but it illustrates the point.

On visual quality, DSSIM compares a converted file against the original, with lower values indicating better quality. Both versions were converted losslessly to PNG before scoring:

DSSIM (0 = equal to original)Bytes
JPEG20000.01926.7 KB
AVIF0.01227.9 KB

AVIF scores slightly better, a difference hardly visible to the human eye.

Choosing a format in practice

AVIF is no silver bullet. Encoders and decoders remain immature, and it adds yet another format to manage — serving three or more versions of every image is painful unless the whole pipeline (resize, compress, convert, select, deliver) is automated. As the data above shows, browser support for AVIF does not guarantee it is the best choice for your users.

Pre-creating AVIF alongside other formats for responsive images is better than ignoring it entirely. The catch is that the browser will pick AVIF whenever it is supported, whether or not it is the right tool. An image CDN can make a more qualified call dynamically among WebP, JPEG 2000 and AVIF, weighing browser compatibility, payload size and visual quality — but only within an automated optimization workflow.