The 2026 Guide to Next-Gen Formats: WebP, AVIF, and JPEG XL
Your 2MB JPEG homepage hero is killing your LCP score. Google's PageSpeed Insights keeps screaming "Serve images in next-gen formats," but which one should you actually use?
WebP has been around since 2010, AVIF promises 50% better compression, and JPEG XL keeps showing up in conversations despite near-zero browser support. This isn't another surface-level format comparison. We're diving into encoder efficiency, chroma subsampling trade-offs, and why Safari's "partial" JPEG XL support means absolutely nothing for production workflows in February 2026.
What's in This Guide
Format Comparison at a Glance
WebP
AVIF
JPEG XL
HEIC
| Format | Browser Support (2026) | Typical Compression vs JPEG | Quality | Best Use Case | Animation Support |
|---|---|---|---|---|---|
| WebP | 96% (universal) | 25-35% smaller | Excellent | Broad compatibility priority | Yes |
| AVIF | 95% (Chrome, Edge, Safari, Firefox) | 20-50% smaller than WebP | Superior at low bitrates | Maximum compression needs | Yes |
| JPEG XL | ~12% (Safari partial only) | 10-30% smaller than AVIF | Exceptional, lossless recompression | Future-proofing only (not production) | Yes |
| HEIC | iOS/macOS native (not web) | Similar to AVIF | Excellent | Mobile capture - web conversion | Limited |
Understanding Modern Image Formats
The web ran on JPEG and PNG for 30 years. Both are now legacy formats - inefficient relics that bloat your payload and tank your Lighthouse scores.
WebP: The Established Standard
Google released WebP in 2010, built on the VP8 video codec. It supports both lossy and lossless compression, alpha transparency, and animation (though animated WebP never caught on like we thought it would).
Why it matters in 2026: WebP hit 96% browser support and became the safe default for production environments. Safari finally implemented full support in 2020, and even IE's death in 2022 eliminated the last major compatibility concern.
If you're still serving JPEG-only images, you're leaving 25-35% file size savings on the table.
AVIF: Maximum Compression for Modern Browsers
AVIF (AV1 Image File Format) emerged from the Alliance for Open Media in 2019. Built on the AV1 video codec - the same tech powering Netflix's 4K streams - AVIF delivers compression efficiency that WebP simply can't match.
Chrome added support in 2020, followed by Firefox and Safari. By 2026, AVIF reached 95% browser coverage. The holdouts? Older Android devices and a few enterprise environments stuck on legacy browsers.
- The compression advantage is real. AVIF consistently produces files 20-50% smaller than WebP at equivalent perceptual quality.
- For hero images and product photography, this translates directly to faster LCP scores.
- The format supports 10-bit and 12-bit color depth (compared to WebP's 8-bit), making it ideal for HDR content and professional photography workflows.
The catch: Encoding speed. AVIF's computational complexity means slower generation times compared to WebP - a consideration if you're batch-processing thousands of images.
JPEG XL: The Future-Forward Format (That Isn't Ready Yet)
JPEG XL emerged from a 2018 standards competition, combining Google's PIK and Cloudinary's FUIF proposals. Finalized in 2022, it promised to replace JPEG, PNG, GIF, and even WebP with a single unified format.
On paper, it's impressive: Progressive decoding, lossless JPEG recompression (converting existing JPEGs to JXL without quality loss), practically unlimited color depth, and modular compression that adapts to content type. File size benchmarks show JPEG XL beating AVIF by 10-30% in certain scenarios.
The reality in February 2026: Browser support is abysmal. Safari offers "partial" support (decoding only, no animation, no progressive rendering). Chrome added decoding back into Chromium in January 2026 but hasn't shipped it to stable releases. Firefox refuses implementation, citing decoder bloat and insufficient gains over AVIF.
HEIC: Mobile-First Considerations
HEIC (High Efficiency Image Container) is Apple's default capture format on iPhones since iOS 11. It's based on HEVC (H.265) video compression and delivers file sizes similar to AVIF.
The problem: HEIC isn't a web format. No browser renders it natively, and many online platforms - eBay, Etsy, Shopify - reject HEIC uploads entirely. If you're shooting on iPhone and uploading to e-commerce platforms or WordPress, you need conversion in your workflow.
JPEGLI: Smarter JPEG, Same Compatibility
Modern JPEG encoders like JPEGLI give you a surprising amount of extra headroom before you even touch WebP or AVIF. JPEGLI keeps the standard .jpg extension and full viewer compatibility but uses more advanced psychovisual tricks to squeeze up to ~30-35% extra compression at high quality compared to traditional encoders such as libjpeg-turbo or MozJPEG.
Real-World Performance Testing
Theory is cheap. Let's measure actual compression with identical source images across formats.
Methodology
We tested four image types using consistent quality settings:
- Photograph: 990KB JPEG, high-detail landscape (Unsplash source)
- Logo: 11KB JPEG, simple vector-style branding
- Animated: 1.3MB GIF, 24-frame looping animation
- Transparency: 225KB PNG, complex alpha channel
All conversions used Cloudinary's default settings (quality ~80-85 equivalent) except where noted. SSIM (Structural Similarity Index) scores measure perceptual quality - higher is better (1.0 = identical).
File Size Comparison
| Format | Photograph | Logo | Animated | Transparency |
|---|---|---|---|---|
| Original | 990KB (JPEG) | 11KB (JPEG) | 1,300KB (GIF) | 225KB (PNG) |
| WebP | 700KB (-29%) | 4KB (-64%) | 488KB (-62%) | 70KB (-69%) |
| AVIF | 507KB (-49%) | 2KB (-82%) | 56KB (-96%) | 18KB (-92%) |
| JPEG XL | 472KB (-52%) | 6KB (-45%) | 14KB (-99%) | 63KB (-72%) |
- Photograph winner: JPEG XL at 472KB (52% reduction), but AVIF at 507KB is negligibly different to the human eye.
- Logo winner: AVIF crushes this test at 2KB - an 88% reduction. WebP manages 4KB. JPEG XL oddly performs worse at 6KB, likely due to default encoder settings optimized for photographic content.
- Animation winner: JPEG XL destroys the GIF at 14KB (99% reduction). This is the most dramatic result - animated GIFs are preposterously inefficient by 2026 standards. AVIF's 56KB is still excellent.
- Transparency winner: AVIF again at 18KB (92% reduction). PNG was never designed for compression; it's a lossless archival format that web developers hijacked for transparency support.
Quality Comparison: SSIM Scores
File size means nothing if images look terrible. SSIM scores (scale 0-1, higher = better):
| Source Type | WebP SSIM | AVIF SSIM | JPEG XL SSIM |
|---|---|---|---|
| Photograph | 0.94 | 0.96 | 0.97 |
| Logo | 0.89 | 0.92 | 0.88 |
| Animated (per-frame avg) | 0.91 | 0.94 | 0.93 |
| Transparency | 0.93 | 0.97 | 0.91 |
AVIF consistently delivers higher perceptual quality at smaller file sizes than WebP. JPEG XL edges out AVIF in photographic content but struggles with flat-color graphics (the logo test).
Encoding/Decoding Speed
Speed matters for workflow efficiency and server load (though if you're optimizing externally before upload - which you should be - encoding happens once, decoding happens millions of times).
Benchmark: 5MP photograph, consumer-grade hardware, libwebp/libavif/libjxl encoders:
| Format | Encode Time | Decode Time (browser) |
|---|---|---|
| WebP | 1.2 seconds | 8ms |
| AVIF | 4.7 seconds | 12ms |
| JPEG XL | 2.9 seconds | N/A (limited support) |
Browser Compatibility Matrix: February 2026
This is where theory meets production reality.
Desktop Browser Support
| Format | Chrome 144+ | Edge 144+ | Safari 26.2 | Firefox 147 | Opera 125 |
|---|---|---|---|---|---|
| WebP | β Full | β Full | β Full | β Full | β Full |
| AVIF | β Full | β Full | β Full | β Full | β Full |
| JPEG XL | β οΈ Flagged | β οΈ Flagged | β οΈ Partial | β Disabled | β Not supported |
Data current as of February 6, 2026
WebP is universally safe. You can ship it today without fallbacks if you're okay dropping IE11 (which you absolutely should be in 2026).
AVIF reached production-ready status. All major browsers support it fully, including animation and progressive rendering. Safari was the last holdout, adding full support in early 2024.
JPEG XL remains experimental. Chrome's January 2026 Chromium commit added decoding but hasn't shipped to stable. Safari's "partial support" is marketing - no animation, no progressive decoding, decode-only means you can view JXL images but can't rely on feature parity. Don't trust the 12% support figure from CanIUse; functional support is closer to 3-5%.
Mobile Browser Considerations
| Format | Chrome Android 144 | Safari iOS 26.2 | Samsung Internet 29 | Firefox Android 147 |
|---|---|---|---|---|
| WebP | β Full | β Full | β Full | β Full |
| AVIF | β Full | β Full | β Full | β Full |
| JPEG XL | β Not supported | β οΈ Partial | β Not supported | β Not supported |
Fallback Strategies
Production-grade implementation requires <picture> elements with format cascades:
<picture>
<source srcset="hero.avif" type="image/avif" />
<source srcset="hero.webp" type="image/webp" />
<img src="hero.jpg" width="1920" height="1080"
alt="Product hero showcasing WebP vs AVIF quality" />
</picture>Browsers download the first format they support, falling back to JPEG for legacy environments. Don't skip the fallback. Enterprise users on locked-down systems and certain government networks still run outdated browsers.
For JPEG XL, add it at the top of the cascade if you're experimenting:
<picture>
<source srcset="hero.jxl" type="image/jxl" />;
<source srcset="hero.avif" type="image/avif" />;
<source srcset="hero.webp" type="image/webp" />;
<img src="hero.jpg" alt="Hero image" />;
</picture>In our own stack, the hero.jpg in these examples is encoded with JPEGLI, which gives you smaller, better-looking JPEGs while staying 100% compatible with every browser and marketplace that only understands .jpg.
When to Use Each Format
Decision fatigue is real. Here's the practical breakdown.
WebP: Choose When Compatibility is Non-Negotiable
- You need near-universal support without fallback complexity
- You're targeting older Android devices (pre-2021 models with outdated Chrome)
- Encoding speed matters more than maximum compression (batch processing thousands of images)
- Your CDN or hosting provider doesn't support AVIF yet (though most do by 2026)
Real-world scenario: E-commerce product galleries with 200+ SKU images. WebP converts fast, serves universally, and delivers 25-35% savings over JPEG - good enough for most workflows.
AVIF: Choose When Performance is Priority
- You're optimizing for Core Web Vitals (LCP, CLS) and every kilobyte matters
- Your content includes hero images, above-the-fold graphics, or high-resolution photography
- You're comfortable implementing
<picture>fallbacks (you should be) - Storage costs concern you - AVIF's 20-50% advantage over WebP compounds at scale
Real-world scenario: Marketing landing pages with full-viewport hero images. A 2MB JPEG hero kills your LCP. A 400KB AVIF version (with WebP fallback) keeps you under budget and improves your Lighthouse score from 60 to 90+.
JPEG XL: Choose When Future-Proofing Experiments
- You're running technical experiments or proof-of-concept projects
- You're implementing multi-format cascades anyway (JXL at top, AVIF/WebP fallbacks)
- You need lossless JPEG recompression for archival workflows (JXL can recompress existing JPEGs without generation loss - useful for massive legacy libraries)
- You have 6-12 months to wait for potential browser adoption (optimistic timeline)
Real-world scenario: Photography portfolios with multi-source fallbacks. Serve JXL to Safari users (partial support), AVIF to everyone else, WebP as final fallback. Users with JXL support get 10-30% better compression; everyone else still gets excellent quality.
HEIC: Don't Use for Web (Convert Instead)
HEIC isn't a web format. Period. If you're shooting on iPhone, convert to JPEG or AVIF before uploading to WordPress, Shopify, Etsy, or eBay. Most platforms reject HEIC uploads with "Unsupported File" errors - a daily frustration for mobile-first sellers.
SEO and Core Web Vitals Impact
Format choice directly affects your search rankings through Core Web Vitals, particularly Largest Contentful Paint (LCP).
LCP Improvements from Format Choice
Google measures LCP as the render time of the largest above-the-fold element - usually a hero image. Threshold targets for 2026:
- Good: Under 2.5 seconds
- Needs Improvement: 2.5-4.0 seconds
- Poor: Over 4.0 seconds
Format impact on a typical 1920x1080 hero image over 4G connection (6 Mbps):
| Format | File Size | Download Time | LCP Impact |
|---|---|---|---|
| JPEG (original) | 1,800KB | 2.4s | β οΈ Borderline |
| WebP (q80) | 1,200KB | 1.6s | β Good |
| AVIF (q75) | 680KB | 0.9s | β Excellent |
| JPEG XL (q80) | 590KB | 0.8s | β Excellent (unsupported) |
Switching from JPEG to AVIF can move you from "Needs Improvement" to "Good" without changing anything else. That's a direct SEO benefit - Google's ranking algorithm weights Core Web Vitals scores for mobile search results.
Google's Next-Gen Format Recommendation
PageSpeed Insights flags images with "Serve images in next-gen formats" when it detects JPEG or PNG. The recommendation explicitly calls out WebP and AVIF as preferred formats. Translation: Google wants you using modern compression. They're not subtle about it. Sites serving legacy formats get dinged in performance audits, which influences rankings.
Real LCP Score Examples
We tested three landing page configurations: Test site: E-commerce homepage, hero image (1920x1080), 6 product thumbnails, standard text/CSS/JS payload.
| Configuration | Hero Format | LCP (Mobile) | LCP (Desktop) | PageSpeed Score |
|---|---|---|---|---|
| Baseline | JPEG 1.8MB | 3.2s β οΈ | 1.9s β | 67 |
| WebP Optimized | WebP 1.2MB | 2.3s β | 1.4s β | 82 |
| AVIF Optimized | AVIF 680KB | 1.8s β | 1.0s β | 91 |
AVIF delivered a 24-point PageSpeed improvement over baseline JPEG. WebP sits in the middle - solid gains, less dramatic than AVIF.
Conversion Workflow and Tooling
Format knowledge means nothing if your tools can't deliver. Here's the production workflow.
Step 1: Choose Your Target Format
- Need universal support? β WebP
- Optimizing for performance? β AVIF (with WebP fallback)
- Future-proofing experiments? β JPEG XL (with AVIF/WebP fallbacks)
Step 2: Optimize Before Upload
External optimization before hitting your CMS avoids plugin bloat. Upload optimized images directly to WordPress, Shopify, Webflow - wherever.
When you do need JPEG (marketplaces, email, legacy apps), use a modern encoder instead of the default export in Photoshop or your CMS. Our converters use Google's JPEGLI library to produce JPEGs that are noticeably smaller at the same visual quality, so your JPEG fallbacks and marketplace uploads carry less weight without sacrificing clarity.
Step 3: Implement Fallbacks
Use <picture> elements for critical images (heroes, product photos). For non-critical images (blog thumbnails, footer icons), WebP-only is acceptable.
Step 4: Validate Core Web Vitals
Run PageSpeed Insights (mobile and desktop) after converting. Verify LCP improvements and confirm no regressions in CLS or FID. Target metrics for 2026:
- LCP: Under 2.5s (under 1.8s for competitive niches)
- CLS: Under 0.1 (watch for image dimension shifts)
- FID/INP: Under 100ms (less affected by images, but interactions can trigger lazy-load jank)
Batch Processing Considerations
Single-image conversion works for one-off projects. Bulk workflows need automation. For 50-100 images, manual batch tools suffice. For 500+, you want API-driven automation. Mochify Pro is built exactly for this β process entire folders via the API with zero-retention guarantees intact, available now for high-volume merchants.
Format Selection Strategy
Stop overthinking this. Here's the 2026 playbook:
- For most production websites: Use AVIF for hero images and above-the-fold graphics (with WebP fallback). Use WebP for everything else. Skip JPEG XL unless you're running experiments.
- For maximum compatibility: Use WebP everywhere. Accept the 20-40% file size penalty vs AVIF. You'll still beat JPEG by 25-35%.
- For bleeding-edge performance: Implement AVIF with aggressive quality settings (q70-75). Add WebP fallback. Monitor Core Web Vitals weekly. Ignore JPEG XL until Chrome ships stable support - probably Q3-Q4 2026 at earliest.
- For marketplace sellers (eBay, Etsy, Amazon): Convert HEIC to JPEG before upload. Platforms don't support WebP/AVIF uploads yet (as of Feb 2026), so pre-optimize JPEGs to their exact dimension requirements. (Our marketplace-specific guides break down exact specs - eBay's 1600px limit, Etsy's 3000px main image requirement, etc.)
- For WordPress users: Avoid image optimization plugins. Seriously. They bloat your database with 5-8 size variants per image, hammer your server with on-demand processing, and often use outdated compression libraries. Optimize externally, upload once, done. (Our guide on fixing LCP without plugins covers the clean workflow.)
The web is finally moving past JPEG and PNG. WebP is safe everywhere. AVIF is the performance king. JPEG XL is the promising future that isn't ready yet. Make your decisions accordingly.
Ready to convert your images?
Try Mochify's zero-retention WebP and AVIF converters - no accounts, no plugins, no stored files. Process in-memory with C++ engine speed, then upload directly to your site or marketplace.
Start Optimizing