How to Choose the Right Image Format for the Web
JPEG, PNG, WebP, AVIF or SVG: we measured all of them on 24 standard test photos and six screenshots. At equal quality WebP saved about 26% and AVIF about 37% against JPEG; lossless WebP halved PNG screenshots.
Five Formats, Two Kinds
Lossy formats (JPEG, lossy WebP, AVIF) throw away detail the eye is unlikely to miss; lossless formats (PNG, lossless WebP, lossless AVIF) keep every pixel; SVG is not pixels at all but drawing instructions. The choice comes down to what is in the image.
Measured: Photos and Screenshots
We encoded the 24 photos of the Kodak test suite (768ร512, lossless originals) with Pillow 12.1 (libjpeg-turbo, libwebp, libavif). For each photo we took JPEG at quality 75 and 85, then found the lowest WebP and AVIF quality that matched the JPEG's structural similarity (SSIM, on luminance). The sizes below are therefore at equal measured quality (October 13, 2026; scripts in our test folder):
| Format at equal SSIM | Size vs JPEG q85 (median) | Range across 24 photos | Size vs JPEG q75 (median) |
|---|---|---|---|
| JPEG | 100% (82 KB) | โ | 100% (60 KB) |
| WebP | 74% | 67-90% | 73% |
| AVIF | 63% | 51-70% | 62% |
So WebP saved about a quarter and AVIF about three-eighths against JPEG, and AVIF came out roughly 14% smaller than WebP. The commonly quoted "AVIF is 30-50% smaller than WebP" did not hold here. Results vary with the image and the encoder settings; SSIM is one quality measure among several.
Screenshots behave differently. On six 1280ร800 screenshots of our own pages, lossless WebP was 32-53% smaller than an optimized PNG (median 49.5%) with identical pixels, while JPEG at quality 85 ranged from 20% smaller to 20% larger than the PNG and blurs text edges.
Choosing by Content
| Content | Use | Fallback |
|---|---|---|
| Photos | AVIF or WebP | JPEG |
| Screenshots, UI, diagrams with text | Lossless WebP | PNG |
| Logos, icons, simple illustrations | SVG (optimize with SVGO) | PNG |
| Transparency in a photo-like image | WebP or AVIF (both have alpha) | PNG |
| Short animations | A muted, looping <video> | GIF only where video cannot play |
Serve the modern format with fallbacks using <picture>:
<picture>
<source srcset="photo.avif" type="image/avif">
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="..." width="1600" height="900">
</picture>
Browser Support
MDN's image format guide lists AVIF in Chrome 85, Firefox 93, Safari 16.1 and Edge 121, and WebP in all current browsers; caniuse puts global support at 96.3% for AVIF and 97.1% for WebP (data of October 13, 2026). The fallback in <picture> covers the rest at no cost.
Our Image Converter writes PNG, JPEG, WebP, BMP and GIF but not AVIF; for AVIF use an encoder such as Squoosh, libavif or Sharp in your build.
Frequently Asked Questions
Should I still use JPEG in 2026?
Is AVIF ready for production?
When should I use PNG over WebP?
- [1]Kodak Lossless True Color Image Suite (test photos) โ
- [2]MDN, Image file type and format guide (AVIF and WebP support), checked Oct 13, 2026 โ
- [3]Can I use, AVIF image format (usage data 2026-10-13) โ
- [4]Can I use, WebP image format (usage data 2026-10-13) โ
- [5]Wang et al., Image quality assessment: from error visibility to structural similarity (SSIM), IEEE TIP 2004 โ
- [6]MDN, Responsive images (srcset and sizes) โ
- [7]web.dev, Replace animated GIFs with video โ
