Skip to main content

AVIF vs WebP vs JPEG XL vs JPEG: which keeps more detail under 100 KB?

We compressed 12 product photos under 100 KB and 200 KB with each format, using the same encoders and size search as our compressor. AVIF kept the most detail, JPEG XL came close behind, and WebP and JPEG were much faster.

Key findings

  • AVIF kept the most detail on all 12 photos under 100 KB, and on 11 of 12 under 200 KB.
  • JPEG XL was a close second at its default effort. At a lower effort, its files were no smaller than a well-optimized JPEG.
  • WebP and JPEG scored close to each other and encoded four to seven times faster than AVIF and JPEG XL.
  • Fine textures are the hard case. On a photo of patterned fabric, every format scored far lower under 100 KB, and WebP had to reduce the dimensions to fit.

Results under the same size limit

For each photo and format, the compressor found the highest quality that fits the limit. We then compared the result with the original using SSIM, a measure of structural similarity. Times include the size search, which encodes each photo several times.

Under 100 KB

Under 100 KB, quality ceiling 100. SSIM: 1 means identical to the original.
FormatAverage SSIMWorst photoPhotos wonTime per photo
AVIF0.9410.79212 / 126.7 s
JPEG XL0.9370.7830 / 1210.9 s
WebP0.9190.6150 / 121.5 s
JPEG0.9240.7090 / 121.7 s

Under 200 KB

Under 200 KB, quality ceiling 100. SSIM: 1 means identical to the original.
FormatAverage SSIMWorst photoPhotos wonTime per photo
AVIF0.9610.84811 / 128.5 s
JPEG XL0.9580.8331 / 1211.6 s
WebP0.9520.8280 / 121.6 s
JPEG0.9500.8240 / 122.1 s

File size at the same detail

We also turned the question around: how many bytes does each format need to match a JPEG saved at quality 85 with mozjpeg?

Average change in file size against mozjpeg quality 85, at equal SSIM.
FormatFile sizeNote
AVIF−37%Smallest files at the same detail
JPEG XL (effort 7)−18%libjxl's default effort, used by the compressor
WebP−8%Fast to encode
JPEG XL (effort 4)+1%Lower effort loses most of the gain
JPEG (libjpeg)+12%A standard JPEG encoder, without mozjpeg

Results for each photo under 100 KB

SSIM for each photo. The best score in each row is in bold.
PhotoAVIFJPEG XLWebPJPEG
Two perfume bottles on golden patterned fabric0.8340.8290.6150.709
Gold and black bottle on a white wooden table0.9920.9900.9890.987
Green leather shoe on a white box0.9880.9840.9850.982
White and black tube bottle0.9950.9940.9920.992
Product bottle on driftwood under studio lights0.9900.9850.9850.983
Maroon plimsoll on yellow textile0.9770.9710.9670.965
Hemp seed oil bottle on a table0.9910.9890.9890.989
Stacked bottle and jars0.8880.8830.8840.884
Skincare products on white pedestals0.9770.9740.9750.973
White body lotion tube on fabric0.8820.8730.8720.869
Serum bottle surrounded by clear rounded shapes0.7920.7830.7860.772
Perfume bottle on a red flower floating on water0.9910.9900.9890.987

Which format should you choose?

  • AVIF for website photos where page weight matters most. Major browsers support it.
  • WebP for large recurring batches where processing time matters, with results close to JPEG at a slightly smaller size.
  • JPEG XL when your audience supports it. Chrome and Edge support JPEG XL decoding from version 155, and Safari supports it from version 17. Keep a JPEG, WebP, or AVIF fallback for older browsers and other clients.
  • JPEG for upload forms, marketplaces, and clients that require it.

Try it on your own images

Results vary with each photo. Compress a sample of your own images to the same limit in two formats and compare them at their display size. Once you have found the right settings, save them as a recipe to reuse them on every new batch.

Method

  • 12 product photos from Unsplash, downloaded at 2400 pixels wide and resized to 1600 pixels wide, a common size for product pages.
  • Encoders: Sharp with libvips 8.18.7, the same build as FastConvert's image workers. JPEG uses mozjpeg, JPEG XL uses effort 7 (libjxl's default and the compressor's setting), and WebP and AVIF use effort 4, FastConvert's defaults for those formats.
  • Size search: the same as the compressor's Maximum file size option, with Resize if needed turned on. Each format starts at quality 100 and lowers it until the image fits. Resizing was needed only once.
  • Score: mean SSIM over 8 × 8 pixel windows of the brightness channel. A resized result is scaled back to 1600 pixels before scoring, so lost detail counts. SSIM is one measure among others and does not replace looking at the images.
  • Times were measured on a desktop computer and are useful for comparing formats, not as absolute values.
Photo credits (12 photos from Unsplash)

Last updated October 23, 2026.

AVIF, WebP, and JPEG XL FAQ

Is AVIF better than WebP?

For photos under a fixed size, yes in this test: AVIF kept more detail than WebP on all 12 photos under 100 KB, and on 11 of 12 under 200 KB. WebP encoded about four times faster and remains a good choice when processing time matters.

Is JPEG XL better than AVIF?

Not for small lossy photos in this test. JPEG XL came second, close behind AVIF, and took longer to encode. It needed 18% fewer bytes than a mozjpeg JPEG for the same detail. Its other strengths, such as lossless compression and progressive loading, were not measured here.

Which image format gives the smallest files?

AVIF needed 37% fewer bytes than a quality 85 JPEG to keep the same detail on these photos, followed by JPEG XL at 18% and WebP at 8%. Results depend on the image: on fine fabric textures, every format lost more detail.

Should I use WebP or JPEG for my website?

WebP and JPEG scored close to each other under the same limit, and WebP files were usually a little smaller at equal detail. Use JPEG when an upload form or client requires it. For a website, AVIF or WebP with a JPEG fallback gives smaller pages.

Why does AVIF not use my whole size limit?

In FastConvert, the Quality setting is a ceiling: the tool lowers it only when an image is over the limit. With the default AVIF quality, many photos were already around 50 KB, well under a 100 KB limit. Raise Quality if you want images to use more of the limit.