For years the conversation was simple: JPEG vs WebP. Then AVIF arrived and changed the game. Now JPEG XL is still waiting in the wings, promising even better efficiency.
So where do we actually stand in mid-2026? We ran a controlled test on 50 real photographs (portraits, landscapes, product shots, and high-detail scenes) at multiple quality levels to find out.
The Test Setup
We used the same 50 source photographs and encoded them with:
- WebP – libwebp, quality 75–85
- AVIF – libavif / aom, quality 45–55 (visually matched)
- JPEG XL – libjxl, equivalent visual quality settings
We measured average file size, encoding time, and decoding performance. We also checked current browser support and real-world delivery on mobile networks.
File Size Results (Average Across 50 Images)
| Format | Avg. Size vs JPEG | vs WebP | Notes |
|---|---|---|---|
| WebP | 25–35% smaller | — | Reliable, fast |
| AVIF | 45–60% smaller | 20–40% smaller | Best overall |
| JPEG XL | 50–65% smaller | Slightly better than AVIF | Best compression, limited support |
On complex photos and gradients, AVIF and JPEG XL pulled further ahead. On simpler images the gap narrowed.
Browser Support in 2026
This is where the ranking changes dramatically.
- WebP — Near-universal support (99%+). Safe everywhere.
- AVIF — Excellent support (Chrome, Edge, Firefox, Safari, Samsung Internet). Comfortably above 95% of global users.
- JPEG XL — Still limited. Safari has partial support, but Chrome removed it years ago and has not restored full production support. Real-world reach remains too low for most sites.
Until Chrome (and therefore the majority of Android users) fully supports JPEG XL without flags, it cannot be recommended as a primary format.
Encoding Speed
This matters more than many people admit, especially for user-uploaded images or large media libraries.
- WebP — Fastest. Excellent for on-the-fly conversion.
- AVIF — Noticeably slower than WebP, but acceptable for most production pipelines (especially with speed presets 6–8).
- JPEG XL — Often the slowest of the three at high effort settings.
If you need fast client-side or server-side conversion, WebP still has a practical advantage. For static assets and build-time optimization, AVIF is fine.
Decoding & Real-World Mobile Performance
On modern devices the difference in decode time is small. On older mid-range Android phones, WebP still has a slight edge in speed, but AVIF has improved significantly and the file-size savings usually more than compensate for any extra decode cost.
On slow mobile networks the smaller AVIF files consistently win — less data transferred means the image appears faster even if decoding takes a few extra milliseconds.
Practical Recommendation for 2026
Here’s the hierarchy we recommend right now:
- Primary format: AVIF
- Fallback: WebP
- Last resort: JPEG (or optimized PNG for simple graphics)
- JPEG XL: Watch and wait — not production-ready for broad delivery yet
The markup stays simple:
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="https://file-hosting.dashnexpages.net/webp/image.jpg" alt="..." width="1200" height="800" loading="lazy">
</picture>
When You Might Choose Differently
- Maximum compatibility + speed → WebP only
- Best possible compression on a controlled audience (e.g. internal tools, modern-only apps) → AVIF or even JPEG XL if you can detect support
- Very simple graphics / icons → WebP or optimized PNG often still wins
Final Verdict
In 2026 the practical winner for most websites is clear: AVIF as primary, WebP as fallback.
JPEG XL remains interesting and technically impressive, but browser support is still the blocker. Until that changes, it stays in the “promising future” category rather than the “use it today” category.
If you haven’t switched your image pipeline to AVIF yet, now is a very good time.
