TL;DR: In the AVIF vs WebP choice, AVIF usually makes smaller files at the same visual quality and supports HDR and wide color, while WebP encodes faster, is supported by more tools and has slightly broader browser support. Both are supported by every current major browser. For most websites, serve AVIF first with a WebP or JPEG fallback, or simply use WebP if you want one simple, fast format.
AVIF vs WebP is the question most site owners hit right after they stop using plain JPEG and PNG. Both are modern, royalty-free image formats that shrink page weight, and both now work in Chrome, Edge, Firefox and Safari. They are not identical, though. This guide compares compression, quality, features, browser support and WordPress support, then gives you a simple rule for which to use.

What is AVIF?
AVIF (AV1 Image File Format) stores images compressed with the AV1 video codec inside a HEIF container. According to MDN’s image format guide, it is open source and royalty-free, supports lossy and lossless compression, transparency, animation, high dynamic range (HDR) and wide color gamut, and offers 8-, 10- and 12-bit color.
Because AV1 was built for streaming video, AVIF benefits from years of codec research. The trade-off is that encoding AVIF is computationally heavier, and MDN notes that AVIF does not support progressive rendering, so a file has to download fully before it appears.
What is WebP?
WebP is Google’s image format, first released in 2010. Its lossy mode is based on the VP8 video codec, and it has a separate lossless mode. Google’s WebP documentation says lossless WebP images are 26% smaller than PNGs, and lossy WebP images are 25 to 34% smaller than comparable JPEGs at equivalent quality. WebP also supports transparency and animation, which makes it a common replacement for PNG and GIF. If you’re still deciding between older formats, our WebP vs PNG guide covers that step.
AVIF vs WebP: side-by-side comparison
| Feature | AVIF | WebP |
|---|---|---|
| Based on | AV1 video codec (HEIF container) | VP8 codec (lossy) plus a separate lossless mode |
| Typical compression | Usually smaller at the same quality | Smaller than JPEG/PNG, usually larger than AVIF |
| Lossy and lossless | Yes | Yes |
| Transparency | Yes | Yes |
| Animation | Yes | Yes |
| Color depth | 8, 10 and 12-bit; HDR and wide gamut | 8-bit |
| Progressive rendering | No | MDN lists AVIF’s lack of progressive rendering as a drawback versus WebP |
| Maximum dimensions | Very large (per MDN) | 16,383 x 16,383 pixels |
| Encoding speed | Slower | Faster |
| Global browser support (Can I Use) | About 96.7% | About 97.3% |
Compression and file size
This is the main reason people pick AVIF. MDN cites a comparison in which AVIF achieved a median compression of about 50% versus about 30% for WebP on the same set of JPEGs. The WordPress core team likewise says AVIF images can be up to 50% smaller than JPEGs while keeping the same quality.
Real results depend on the image and the encoder settings. AVIF tends to shine on photos and gradients at low to medium quality, where it avoids the blocky artifacts JPEG produces. At very high quality settings the gap between AVIF and WebP narrows. The only reliable way to know for your images is to export a few samples in both formats and compare them side by side.
Image quality
At the same file size, AVIF typically keeps more detail and smoother gradients, and its higher bit depth helps with skies, shadows and HDR photos. WebP’s lossy mode uses 4:2:0 chroma subsampling, according to MDN, which can soften fine colored edges such as red text on a photo. For screenshots, diagrams and logos, use a lossless setting in either format, or SVG for true vector art (see our SVG vs PNG explainer).
Browser support in 2026
Both formats are now safe for the vast majority of visitors. Can I Use lists AVIF support at roughly 96.7% of global usage and WebP at roughly 97.3%. Per MDN, AVIF arrived in Chrome 85, Firefox 93, Opera 71, Safari 16.1 and Edge 121, while WebP has been in every major browser for longer.
The small remaining gap is mostly older Safari versions and a few niche browsers such as Opera Mini. That is why MDN still recommends providing a fallback when you use AVIF.
How to use AVIF and WebP together
You don’t have to choose just one. The HTML <picture> element lets the browser pick the first format it supports:
<picture>
<source srcset="photo.avif" type="image/avif">
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="Describe the image" width="1600" height="900">
</picture>Many image CDNs and optimization plugins do this automatically by checking the browser’s Accept header and serving AVIF, WebP or JPEG as appropriate.
AVIF and WebP in WordPress
WordPress has accepted WebP uploads since version 5.8, and the core team announced that WordPress 6.5 added AVIF support, as long as your server’s image library (Imagick or GD) supports it. You can check under Tools, Site Health, Info, Media Handling. Core does not automatically serve different formats to different browsers, so for automatic AVIF/WebP delivery with fallbacks you’ll still want a plugin or an image CDN.
Which should you use?
- Choose AVIF for large hero images, photo-heavy pages and HDR or wide-color images where every kilobyte matters, ideally with a fallback.
- Choose WebP if you want one format that encodes quickly, works almost everywhere and is supported by nearly every tool and CMS.
- Use both through
<picture>or an image CDN if you want the smallest files without risking broken images. - Keep PNG or SVG for logos, icons and line art that need perfectly crisp edges (our PNG vs JPG guide explains why).
Quick tips for converting images
- Start from the highest-quality original you have, not an already compressed JPEG.
- Test a few quality levels; for AVIF, mid-range settings often look as good as much higher WebP settings.
- Always set width and height attributes to avoid layout shift.
- Keep the originals so you can re-export if a better encoder comes along.
- If you run a design team, document the chosen formats in your design system.
The bottom line
In the AVIF vs WebP matchup, AVIF wins on compression and color, while WebP wins on encoding speed and tool support. Since both work in every current major browser, the best setup for most sites is AVIF first, WebP or JPEG as a fallback, and lossless PNG or SVG for graphics with sharp edges.

Sources
- MDN: Image file type and format guide
- Google for Developers: An image format for the Web (WebP)
- Can I Use: AVIF image format
- Can I Use: WebP image format
- Make WordPress Core: WordPress 6.5 adds AVIF support



