Which image format is better for SEO and web performance: WebP or AVIF?
AVIF offers better compression than WebP (20–50% smaller file size for equivalent quality), but WebP has greater compatibility (97% of browsers vs 95% for AVIF according to caniuse.com). The recommended strategy is progressive adoption: serve AVIF as the first option with fallback to WebP and JPEG via the picture element. Unoptimised images can represent up to 60% of the total weight of a web page.
Key takeaways
- WebP reduces image size by 30% vs JPEG and 45% vs PNG while maintaining equivalent visual quality — data from Google WebP documentation.
- AVIF reduces size by an additional 20–50% compared to WebP for photographs; for illustrations and graphics the advantage is reduced to 10–20%.
- AVIF browser support is 95% globally (caniuse.com, 2024); WebP has 97% support. Both require a fallback to JPEG/PNG for full compatibility.
- Images are the single most determining factor for LCP (Largest Contentful Paint): an optimised hero image can reduce LCP by up to 40%.
- Cloudinary and Imgix automatically serve the optimal format based on the user's browser, eliminating the need for manual format management.
Images account for roughly half the total bytes transferred on an average web page, and most of those bytes are unnecessary. The same photograph served as a compressed WebP will look identical to the user whilst weighing 30% less than its JPEG equivalent. Serve it as AVIF and you can reduce that further still.
The format question is not purely theoretical. In practice, the decision affects LCP directly: a hero image that takes 3.5 seconds to load is the reason a page fails Core Web Vitals, not the JavaScript or the fonts. We have audited sites where converting the hero image alone moved LCP from 4.2s to 2.1s. That is not an edge case.
The choice between WebP and AVIF depends on your audience’s browsers and whether you have a CDN that can handle automatic format negotiation. Both are covered in detail below.
Next-Generation Formats: Benefits and Evolution
WebP: Google’s Standard Format
This format developed by Google offers both lossy and lossless compression, significantly reducing file sizes.
Advantages of the Google format:
- Reduced size: Files are approximately 30% smaller than JPEG and 45% smaller than PNG with similar quality.
- Transparency support: Like PNG, but with a smaller file size.
- Animation support: Like GIF, but more efficient.
- Wide browser support: The majority of modern browsers support it.
Example size comparison:
| Image | JPEG | PNG | Google Format |
|---|---|---|---|
| Landscape photo | 200KB | N/A | 140KB |
| Logo with transparency | N/A | 150KB | 80KB |
| Simple illustration | 100KB | 120KB | 60KB |
Implementation on your site:
<!-- Basic usage of the optimised format -->
<img src="image.webp" alt="Clear description of the image">
<!-- Usage with fallback for older browsers -->
<picture>
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Clear description of the image">
</picture>
AVIF: The Future of Web Images
This newer format based on the AV1 video codec offers even more efficient compression.
Main advantages: superior compression (20–50% additional), better detail preservation, HDR support and advanced features such as transparency and animations.
Limitations: limited compatibility (though growing), longer encoding time and less mature tooling ecosystem.
Performance comparison:
| Image | JPEG | Google Format | AVIF |
|---|---|---|---|
| Complex photo | 250KB | 175KB | 100KB |
| Image with text | 150KB | 105KB | 60KB |
| Detailed illustration | 180KB | 120KB | 70KB |
Progressive Adoption Strategy
The key is to use both formats strategically with a progressive approach:
- Basic level: Optimised JPEG/PNG for universal compatibility
- Intermediate level: WebP with fallback to traditional formats
- Advanced level: AVIF with fallback to WebP and traditional formats
<!-- Optimal implementation with graduated support -->
<picture>
<source srcset="image.avif" type="image/avif">
<source srcset="image.webp" type="image/webp">
<img src="image.jpg" alt="Detailed description of the image" loading="lazy">
</picture>
Conversion and Optimisation Tools
Image conversion:
For WebP: cwebp (official tool), Squoosh, ImageMagick, and WordPress plugins such as Express.
For AVIF: avifenc (official encoder), Squoosh (full support), and specialised online tools.
Additional optimisations:
- Responsive sizing with
srcset - Lazy loading for on-demand loading
- Specialist CDN (Cloudinary, Imgix, Cloudflare)
- CSS/SVG sprites for small icons
Conclusions and Recommendations
Adopting next-generation formats is a direct path to improving web performance. WebP offers an excellent balance between compatibility and efficiency, while AVIF represents the future with superior compression. Run PageSpeed Insights on your ten highest-traffic pages right now. If any return an LCP above 2.5 seconds or a CLS above 0.1, you have a specific problem to solve. Tell us what you found and we will tell you where to start.
Sources and references
-
Google WebP Documentation (developers.google.com)
-
AVIF Image Format - caniuse.com (caniuse.com)
-
web.dev: Use modern image formats (web.dev)
-
Squoosh - Image Compression Tool (squoosh.app)
-
HTTP Archive: State of Images 2023 (almanac.httparchive.org)
Share this article
If you found this content useful, share it with your colleagues.
Frequently Asked Questions
WebP or AVIF for my website in 2025?
It depends on the use case: For high-quality photographs: AVIF offers better compression. For icons and simple graphics: WebP is sufficient. For maximum compatibility without a CDN: WebP with JPEG fallback. For production with a modern CDN (Cloudinary, Imgix): serve AVIF automatically with fallback. The correct implementation uses the HTML picture element with multiple source elements ordered from most to least efficient.
How to convert images to WebP and AVIF in batch?
Command-line tools: cwebp (WebP, from Google) and avifenc (AVIF). For automated workflows: Sharp (Node.js) enables programmatic conversion in web projects. Online tools: Google's Squoosh.app lets you visually compare quality before converting. In build systems (Webpack, Vite, Astro): automatic plugins convert images during the build process.
Do WebP/AVIF images directly improve SEO rankings?
Not directly, but through performance. Optimised images improve LCP (Largest Contentful Paint), which is a Core Web Vitals metric and a ranking signal since 2021. They also reduce total load time (FCP), which improves user experience on mobile and can positively impact bounce rate.