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
| Format | Average SSIM | Worst photo | Photos won | Time per photo |
|---|---|---|---|---|
| AVIF | 0.941 | 0.792 | 12 / 12 | 6.7 s |
| JPEG XL | 0.937 | 0.783 | 0 / 12 | 10.9 s |
| WebP | 0.919 | 0.615 | 0 / 12 | 1.5 s |
| JPEG | 0.924 | 0.709 | 0 / 12 | 1.7 s |
Under 200 KB
| Format | Average SSIM | Worst photo | Photos won | Time per photo |
|---|---|---|---|---|
| AVIF | 0.961 | 0.848 | 11 / 12 | 8.5 s |
| JPEG XL | 0.958 | 0.833 | 1 / 12 | 11.6 s |
| WebP | 0.952 | 0.828 | 0 / 12 | 1.6 s |
| JPEG | 0.950 | 0.824 | 0 / 12 | 2.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?
| Format | File size | Note |
|---|---|---|
| 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
| Photo | AVIF | JPEG XL | WebP | JPEG |
|---|---|---|---|---|
| Two perfume bottles on golden patterned fabric | 0.834 | 0.829 | 0.615 | 0.709 |
| Gold and black bottle on a white wooden table | 0.992 | 0.990 | 0.989 | 0.987 |
| Green leather shoe on a white box | 0.988 | 0.984 | 0.985 | 0.982 |
| White and black tube bottle | 0.995 | 0.994 | 0.992 | 0.992 |
| Product bottle on driftwood under studio lights | 0.990 | 0.985 | 0.985 | 0.983 |
| Maroon plimsoll on yellow textile | 0.977 | 0.971 | 0.967 | 0.965 |
| Hemp seed oil bottle on a table | 0.991 | 0.989 | 0.989 | 0.989 |
| Stacked bottle and jars | 0.888 | 0.883 | 0.884 | 0.884 |
| Skincare products on white pedestals | 0.977 | 0.974 | 0.975 | 0.973 |
| White body lotion tube on fabric | 0.882 | 0.873 | 0.872 | 0.869 |
| Serum bottle surrounded by clear rounded shapes | 0.792 | 0.783 | 0.786 | 0.772 |
| Perfume bottle on a red flower floating on water | 0.991 | 0.990 | 0.989 | 0.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)
- Two perfume bottles on golden patterned fabric by yousef samuil
- Gold and black bottle on a white wooden table by Kadarius Seegars
- Green leather shoe on a white box by Irene Kredenets
- White and black tube bottle by Cierra Henderson
- Product bottle on driftwood under studio lights by Sofia Lasheva
- Maroon plimsoll on yellow textile by Paul Gaudriault
- Hemp seed oil bottle on a table by Alex Lvrs
- Stacked bottle and jars by Alex Lvrs
- Skincare products on white pedestals by Reuben Mansell
- White body lotion tube on fabric by Mathilde Langevin
- Serum bottle surrounded by clear rounded shapes by Pavlo
- Perfume bottle on a red flower floating on water by majed swan
Last updated October 23, 2026.