Speed & performance · Explainer
WebP vs AVIF for WordPress: File Size and Support Compared
Short answer
AVIF usually makes the smaller file: it can be up to 50 percent smaller than JPEG at the same quality, while lossy WebP is 25 to 34 percent smaller. WebP encodes faster, works on more servers, and has been supported in WordPress longer, since version 5.8 against AVIF in 6.5. For most WordPress sites, AVIF suits large photos with a WebP fallback, and WebP suits the rest of the library.
Key takeaways
- AVIF can be up to 50 percent smaller than JPEG at the same quality, ahead of lossy WebP at 25 to 34 percent smaller.
- WordPress has supported WebP uploads since version 5.8 and AVIF uploads since version 6.5.
- Every current major browser supports both formats, so old browsers and old apps are the remaining gap.
- AVIF encoding can be an order of magnitude slower than other formats, which raises server CPU cost.
- Check Tools, Site Health, Info, then Media Handling to see whether your server can process AVIF.
- W3Techs counted WebP on 24.0 percent of websites in November 2026, against 1.8 percent for AVIF.
What is the core difference between WebP and AVIF?
WebP is Google's older, widely supported format, while AVIF is the newer format built on the AV1 video codec that usually makes smaller files.
WebP covers lossy and lossless compression, transparency, and animation in one format, according to Google's WebP documentation.
AVIF is short for AV1 Image File Format, and it stores a still image with the compression of the AV1 video codec, which is why it can squeeze photos further than WebP at the same visual quality.
The trade is simple: AVIF wins on file size, and WebP wins on encoding speed and tool support.
How much smaller are WebP files than JPEG and PNG?
Lossy WebP files are 25 to 34 percent smaller than comparable JPEG files, and lossless WebP files are 26 percent smaller than PNG files.
Google's WebP documentation reports those figures at equivalent quality, measured with the SSIM quality index, as of November 2026.
Lossless WebP also handles transparency at a cost of just 22 percent more bytes, while lossy WebP with transparency is typically 3 times smaller than a PNG.
Those savings come from Google's test set, so your own images may save more or less depending on detail, colour, and quality settings.
Smaller images are one part of a faster site, and our guide to how to speed up WordPress covers the other parts.
How much smaller are AVIF files than JPEG and WebP?
AVIF files can be up to 50 percent smaller than JPEG files at the same image quality, which also puts them ahead of WebP on most photos.
The WordPress 6.5 AVIF developer note states the “up to 50 percent smaller than JPEGs” figure, as of November 2026.
web.dev's guide to modern image formats reports that AVIF and WebP usually deliver 25 to 50 percent smaller files than JPEG and PNG at the same perceived quality.
web.dev's AVIF guide adds that savings above 50 percent against JPEG are possible in some cases, but results depend on the image, the encoder settings, and the quality target.
That gap is why AVIF is the first choice for large photos, while WebP stays a strong second choice when encoding speed matters.
Which browsers support WebP and AVIF?
Every current major browser supports both WebP and AVIF, so browser support is no longer the reason to avoid either format.
Google's WebP documentation lists native WebP support in Chrome, Safari, Firefox, Edge, and Opera.
The WordPress 6.5 AVIF developer note states that AVIF is supported in all major browsers, as of November 2026.
Older browsers and some desktop apps still lag behind, so a fallback still matters for visitors on old software.
If your audience includes many users on old devices, serve WebP or JPEG as a fallback behind AVIF.
Image size affects loading, and loading affects search, as explained in does page speed affect SEO.
How do WebP and AVIF compare side by side?
AVIF wins on compression, WebP wins on encoding speed and tool support, and both beat JPEG and PNG on file size.
| Feature | WebP | AVIF |
|---|---|---|
| Typical saving vs JPEG | 25 to 34 percent smaller | Up to 50 percent smaller |
| Lossless mode | Yes | Yes |
| Transparency | Yes, lossy and lossless | Yes |
| Animation | Yes | Yes |
| Encoding speed | Fast | Slow |
| WordPress support since | Version 5.8 | Version 6.5 |
| Share of websites, November 2026 | 24.0 percent | 1.8 percent |
The table shows the real trade: AVIF buys smaller files with slower encoding, while WebP buys speed and wider tool support with larger files.
W3Techs counted WebP on 24.0 percent of websites and AVIF on 1.8 percent in November 2026, so WebP is far more common even though AVIF compresses better.
A site can use more than one format, so the two shares do not add to 100 percent.
Does WordPress support WebP and AVIF?
WordPress has supported WebP uploads since version 5.8 and AVIF uploads since version 6.5, as long as your server can process the format.
The developer reference for WordPress lists AVIF support added in 6.5.0 and WebP support added in 5.8.0.
WordPress does not convert your JPEG uploads on its own: an uploaded JPEG stays a JPEG unless you change the output format with the image_editor_output_format filter or use a plugin.
web.dev's guide to images in WordPress shows that filter mapping JPEG uploads to WebP, and the same filter can map them to AVIF.
The WordPress 6.5 developer note gives a quick check: open Tools, then Site Health, then the Info tab, then Media Handling, and look for AVIF in the list of supported formats.
If your server lacks AVIF support, compare the conversion tools in Smush vs ShortPixel compression test before picking a plugin.
When should you pick WebP, and when should you pick AVIF?
Pick AVIF for large photos and hero images when your server can encode it, and pick WebP for the rest of the library where speed and compatibility matter more.
- Large photos and hero images: AVIF, because the saving is biggest where the file is biggest.
- Thumbnails, screenshots, and graphics: WebP, because it encodes fast and every tool handles it.
- User uploads and large media libraries: WebP, because slow AVIF encoding adds up across thousands of files.
- Any image served with a fallback: AVIF first, then WebP, then JPEG, so the browser takes the first format it can show.
Offer the formats in that order with a picture element, and the browser takes the first source type it supports, as shown in web.dev's WordPress image guide.
What does switching to WebP or AVIF cost?
Both formats are free to use, so the cost is the work of converting files and the server CPU used to encode them, not a licence fee.
Cloudflare's Images documentation states AVIF encoding can be an order of magnitude slower than encoding to other formats.
Cloudflare also falls back to WebP or JPEG when an image is too large to encode to AVIF quickly, and its default quality setting is 85.
On your own server, the PHP manual for imageavif lists speed from 0, slow with smaller files, to 10, fast with larger files, with 6 as the default.
That means AVIF costs more CPU on upload or conversion, while WebP costs less, and neither format adds a per-image fee by itself.
If a CDN converts your images for you, check what its image service costs in how much does a CDN cost for WordPress.
What is the verdict for a WordPress site?
Use AVIF for your biggest photos with a WebP fallback, use WebP as your default for the rest of the library, and keep JPEG only where a fallback is needed.
This split gets most of the AVIF saving where it counts and keeps encoding fast for the bulk of your images.
If your host cannot process AVIF, WebP alone is still a large improvement over JPEG: lossy WebP is 25 to 34 percent smaller than JPEG, according to Google's WebP documentation.
Smaller images also help the image metrics in Core Web Vitals, as covered in how to pass Core Web Vitals in WordPress.
Check your server first in Site Health, then convert new uploads, and measure the change in page weight before converting an old library.
What mistakes should you avoid?
Do not upload AVIF files before checking server support, do not convert an old library without a fallback, and do not assume a smaller format fixes oversized images.
- Uploading AVIF to a server without AVIF support fails, so check Media Handling in Site Health first.
- Converting every old JPEG to AVIF-only copies leaves old browsers with nothing to show, so keep a WebP or JPEG fallback.
- A modern format does not fix an image that is far wider than its place on the page, so size images to the layout first.
- Pushing quality too low to chase the smallest file hurts the image more than the saving helps, so compare the result at full size.
Frequently asked questions
Is AVIF always smaller than WebP?
Usually, but not on every image. AVIF can be up to 50 percent smaller than JPEG, while lossy WebP is 25 to 34 percent smaller, so AVIF normally wins on photos. Small graphics and simple images can break the pattern, so compare both versions of your own key images before you commit to one format.
Does WordPress convert my JPEGs to AVIF automatically?
No. WordPress has accepted AVIF uploads since version 6.5 and WebP uploads since 5.8, but it does not convert JPEG uploads on its own. An uploaded JPEG stays a JPEG unless you change the output format with the image_editor_output_format filter or use a plugin that converts uploads.
Will AVIF images work for all my visitors?
Almost all of them. Every current major browser supports AVIF, according to the WordPress 6.5 developer note. Visitors on very old browsers or old apps may still see nothing, so serve AVIF with a WebP or JPEG fallback if a large share of your audience uses old software.
Should I replace all my JPEGs with AVIF?
Not in one pass. Start with your largest photos, where the saving is biggest, and check that your server can encode AVIF first. Keep WebP as your default for the rest of the library, and keep a fallback so older browsers still see your images.
Why is AVIF slower to create than WebP?
AVIF squeezes files harder, and that work takes more CPU time. Cloudflare's documentation states AVIF encoding can be an order of magnitude slower than encoding to other formats. That cost lands when the image is created or converted, not when a visitor loads the finished file.
Sources
- An image format for the Web Google for Developers
- Serve images in modern formats web.dev
- Compress images using AVIF web.dev
- WordPress 6.5 adds AVIF support Make WordPress Core
- Usage statistics of image file formats for websites W3Techs
- Features Cloudflare Images docs
- imageavif PHP Manual
- Site generators, frameworks, and CMSs web.dev
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
