Every image guide says the same thing. Use WebP, or better, use AVIF, and your pages will get lighter. But by how much, and is the extra work for AVIF worth it on a normal WordPress site? Instead of repeating numbers from other articles, we ran our own small test and measured it.
This article shares what we found, what it means for a WordPress site, and the simplest way to start serving modern images without breaking anything.
What We Tested and What We Found
We took four real photos with different content. A cup of coffee on a table, a cat, a portrait and an outdoor scene with a rocket, sky and a launch tower. Each photo was saved as JPEG, WebP and AVIF using the standard open source encoders that most image plugins also use.
The important part is how we compared them. Saving every format at "quality 80" is not a fair test, because each format uses that number differently. So for each format we kept lowering the quality until the image was just as close to the original as the others, measured with a standard image similarity score. Then we compared file sizes at that equal level.
| Photo | JPEG | WebP | AVIF |
|---|---|---|---|
| Coffee cup, 600 × 400 | 78.8 KB | 54.2 KB | 40.9 KB |
| Cat, 451 × 300 | 21.4 KB | 15.9 KB | 12.6 KB |
| Portrait, 512 × 512 | 51.5 KB | 33.9 KB | 24.1 KB |
| Outdoor scene, 640 × 427 | 64.1 KB | 51.6 KB | 40.0 KB |
| All four photos | 215.9 KB | 155.7 KB | 117.5 KB |
At the same visual quality, WebP files were 28% smaller than JPEG and AVIF files were 46% smaller. AVIF was also 25% smaller than WebP. For comparison, the same four photos saved as PNG came to 1,385 KB, more than ten times the AVIF size. That is why a photo should never be a PNG.
Two other results surprised us. The first is how different the quality settings were. To look the same, JPEG needed quality settings between 77 and 94, while AVIF needed only 59 to 84. So if a plugin uses the same quality number for every format, some images will look worse and others will be bigger than they need to be.
The second is speed. Making one AVIF file took about 208 milliseconds on our test machine, compared with about 74 for WebP and 2 for JPEG. A visitor never feels this, because the file is made once and then saved. But your server does. Converting a media library with thousands of images to AVIF on cheap shared hosting can take hours and may hit your host's time limits.
What This Means for a WordPress Site
For most business sites, the gain from images is bigger than from almost any other speed fix. Images are usually the heaviest part of a page, and the hero image at the top is often the element Google measures for loading speed. Our guide to speeding up a WordPress homepage explains why that first image matters so much.
Our results point to a simple rule. If your site has a lot of photos, such as a shop, a restaurant, a travel blog or a portfolio, AVIF is worth it, because it saves a quarter of the file size even compared with WebP. If your site has only a few images per page, WebP gets you most of the benefit with less server work.
There is no need to choose only one. The best setup serves AVIF to browsers that support it, WebP to those that do not, and the original JPEG as a last fallback. Good image plugins handle this for you, so you never have to write the code yourself.
Want lighter images without doing it by hand? Our WordPress speed optimization service converts your media library to modern formats, sets the right quality for each one and checks that nothing looks worse.
How to Start Serving WebP and AVIF
WordPress can already handle both formats. WebP uploads have worked since WordPress 5.8, and AVIF since 6.5, as long as your server's image library supports it. Before you install anything, check what your server can do. Go to Tools, then Site Health, open the Info tab and look at the Media Handling section, which lists the image formats your server supports.
- Pick one image plugin. Tools like ShortPixel, EWWW Image Optimizer, Imagify or Converter for Media can convert existing images and new uploads. Use only one, because two image plugins often convert the same files twice.
- Choose how the images are delivered. Some plugins rewrite the image addresses in your pages, others use server rules or their own CDN. The CDN option is easiest on shared hosting, because the conversion happens on the plugin's servers, not yours.
- Convert a few images first. Open some pages and compare them side by side with the originals, especially photos with faces, skin and sky, where poor compression shows first.
- Then convert the whole library. Run it at a quiet time and keep a backup of the originals, as our WordPress backup guide explains.
- Resize before you upload. No format can fix a 5,000 pixel photo shown at 1,200 pixels. Resize large photos on your computer first, or set a maximum size in your image plugin.
You may find old tutorials that suggest adding ALLOW_UNFILTERED_UPLOADS to wp-config.php so WordPress accepts new formats. Do not do this. It lets administrators upload any file type, including scripts, and it is not needed for WebP or AVIF on a current WordPress version.
Keep the Library Light Over Time
A converted library slowly gets heavy again as new team members upload photos straight from their phones or stock sites. Set your image plugin to convert new uploads automatically, and check now and then that new posts use modern formats. The best time to set this up is when a site is built, which is why our WordPress website design team adds image rules before launch.
After a conversion, test your most important pages in PageSpeed Insights and watch the image numbers in your Core Web Vitals report over the following weeks. If you would rather not check this yourself, image checks are part of our WordPress maintenance plans.
