AVIF produced the smallest file for every one of the 54 photos we tested, and its total was 40.1% smaller than JPG at the same size and preset. WebP was a closer call: its total was only 1.5% smaller than JPG, and for 20 of the 54 photos it was larger. This post lays out the setup, the numbers and what they mean for choosing a format.
Key takeaways
- Totals for the same 54 photos at 2,048 px: JPG 27.1 MB, WebP 26.7 MB, AVIF 16.2 MB.
- AVIF was smaller than both other formats for all 54 photos.
- The median AVIF was about half the size of the matching JPG (51%).
- WebP versus JPG depended on the photo: 24 WebPs were at least 10% smaller, 18 were within 10%, and 12 were more than 10% larger.
- Quality numbers are not comparable across encoders, so "quality 82" in WebP is not the same as "quality 82" in JPG.
How we tested
Photos. 54 free-license Unsplash photos of businesses (trades, clinics, shops, offices, blogs), all JPEG originals. They are stock photos, not customer files.
Settings. Every photo was resized to 2,048 px wide, stripped of metadata and encoded with our tool's High preset:
- JPG: quality 82, 4:2:0 chroma subsampling, progressive
- WebP: quality 82, lossy
- AVIF: quality 55, 4:4:4 chroma
Quality check. We scored each AVIF with SSIM (structural similarity, Wang et al., 2004) against the original resized to the same dimensions, measured at 1,024 px. The lowest score was 0.9908 and the median 0.9964. We did not score the JPG or WebP versions, which is the main limit of this comparison.
Units. 1 MB = 1,048,576 bytes. Percentages are computed from exact byte counts.
The totals
Format | Total bytes | Total | vs JPG |
|---|---|---|---|
JPG | 28,383,973 | 27.1 MB | n/a |
WebP | 27,945,242 | 26.7 MB | 1.5% smaller |
AVIF | 17,003,431 | 16.2 MB | 40.1% smaller |
Method: 1 − (format total ÷ JPG total). AVIF versus WebP: 1 − (17,003,431 ÷ 27,945,242) = 39.2% smaller.
Per photo: AVIF vs JPG
Totals can hide a lot, so we also divided each photo's AVIF size by its JPG size.
- Median ratio: 0.51 (the AVIF was about half the JPG).
- Best: a jewelry store photo, where the AVIF was 22% of the JPG's size. A medical practice and a plumber photo were close behind at 23%.
- Worst: a yoga studio photo at 92%, a florist at 90% and a landscaping photo at 87%.
- 26 of the 54 AVIFs were less than half the size of their JPG.
The weak cases share a trait: dense, random detail. The yoga photo has film-style grain across the frame; the florist and landscaping photos are full of petals, leaves and grass. Encoders compress smooth areas and repeated structure well and random texture badly, whatever the format.
Per photo: WebP vs JPG
This was the surprise. Dividing each WebP by its JPG:
- 24 photos: WebP at least 10% smaller. The best was an accountant's desk (99 KB WebP vs 193 KB JPG) and a restaurant dish (95 KB vs 174 KB).
- 18 photos: within 10% either way.
- 12 photos: WebP more than 10% larger. The largest gap was an optometrist's eye chart (956 KB WebP vs 742 KB JPG); a landscaping photo was 2,129 KB vs 1,750 KB.
This does not mean WebP is worse than JPG. It means equal quality numbers do not produce equal quality or equal size across encoders. A lower WebP quality setting might match the JPG visually and come out smaller. If you are switching from JPG to WebP to save bytes, compare a few of your own photos side by side at 100% zoom, adjusting the WebP quality until they look the same, before converting a whole library.
Per photo: AVIF vs WebP
The median AVIF was 57% of the matching WebP. The smallest ratio was a food blogger photo at 26%; the largest was the yoga studio photo at 82%. AVIF was smaller than WebP in every case.
What this means for your site
For photo-heavy pages, AVIF is worth it if you can serve a fallback. Caniuse puts global AVIF support at about 96% (October 2026). MDN recommends including a fallback format with AVIF, typically through the picture element.
If you can only serve one file, JPG remains a reasonable default for photos. It works everywhere, and at a sensible quality setting it can be close to WebP in size, as this test shows. WebP's advantages over JPG in MDN's guide (transparency, animation, lossless mode) matter more for graphics than for photos.
Resizing matters more than format. Every number above is for photos already resized from a median of 24 megapixels to 2,048 px wide. The originals totaled 183.0 MB; even the JPG versions were 85.2% smaller than that. Choosing AVIF took the saving to 91.1%.
Test your hardest photos. Grainy, leafy or highly textured photos are where every format struggles. Check those by eye.
Limits
One preset, one width, one set of encoders and stock photos. We measured SSIM for AVIF only. A different quality pairing, for example WebP at a lower quality, would change the WebP results. We'd treat this as a realistic example of what one fixed preset does, not a ranking of formats under all conditions.
Convert your own photos
Our JPG to AVIF converter uses the same High preset as this test, and the Free plan exports AVIF or JPG for your first 15 photos, once. WebP output starts on Starter, and JPG to WebP shows how that conversion works. To compare formats across a whole folder, use batch convert.
Keep reading
Sources
Questions
Short answers to what people ask about this.