Last updated: · By Asael Dreyer
In short: to use WebP images in WordPress, you install a plugin that converts your images and serves WebP to browsers that support it. WordPress has accepted WebP uploads since version 5.8, but it does not convert anything on its own. The savings are real on large images, but not on every file: on my site, on 7 Nov 2026, 108 of 476 WebP files (23%) came out heavier than the original. I disabled them with a reversible rename, and the homepage went back to serving the lighter original.
⏱ Time needed: 20–40 minutes · Difficulty: easy · Last tested: 7 Nov 2026, on my own site (Imagify 2.3.4, WordPress 7.1.4)
What did I measure on my own site?
All the numbers here were measured on 7 Nov 2026 on cw-servers.com: the plugin settings, the database figures, and the real file sizes checked with curl. I did not change the Imagify settings. The only change was disabling heavy WebP files, which I describe in the section on WebP files that grow.
| What I checked | Result (measured 7 Nov 2026) |
|---|---|
| Server support | PHP 8.4 with a GD library that supports both WebP and AVIF |
| Plugin | Imagify 2.3.4: automatic compression on upload, backup of the original, resizing of images larger than 2560 pixels |
| How it is delivered | WebP through the <picture> tag |
| Total savings according to the plugin | 207 images: from 56.0MB to 21.8MB, about 61% less |
| All WebP files in the uploads folder | 476 files, 108 of them (23%) larger than or equal to the original |
| Homepage: 18 images with a WebP alternative (before the fix) | Originals: 158KB. WebP versions: 365KB. 2.3 times more |
| Homepage after the fix | <picture> tags: from 19 to 1. All image URLs return 200 |
| Main image on the homepage | PNG 72.9KB vs WebP 79.7KB, about 9% more |
| Elementor images | 6 images from the elementor/thumbs folder were served as JPG, with no WebP alternative |
The takeaway: conversion saved a lot on large content images, but on small logos and icons it did harm. For the DigitalOcean logo, for example, the PNG weighs 2.0KB and the WebP weighs 6.8KB. In a modern browser, visitors got the heavier version until I fixed it.
Why is WebP sometimes larger than the original, and what did I do about it?
WebP is not always smaller. On 7 Nov 2026 I compared every WebP file on the site with its original: 108 of 476 (23%) came out larger or equal. Most were small PNG logos with few colors, and the main image on the homepage was among them.
The reason: a PNG with a small palette is already very compressed, and a WebP file has a fixed overhead for its file structure. In a file under a kilobyte, that overhead decides the outcome. The most extreme example on my site: a 709-byte PNG logo became a 1,222-byte WebP, almost 1.7 times larger.
How do you check which WebP files are larger than the original?
You compare sizes, file by file. Imagify stores the WebP in the same folder with an extra extension: logo.png gets logo.png.webp. You can see the same pattern in the homepage HTML on my site, which makes every pair easy to check.
- Quick check in the browser: press F12, open the Network tab, filter by Img, and open the original URL and the webp URL. Compare the Size column.
- Full check on the server: connect over SSH (on Cloudways, use the SFTP/SSH user from the dashboard), go to the
wp-content/uploadsfolder and run the script below. It only reads and prints, and changes nothing. - Save the list to a file and review it by eye before you decide anything.
find . -name '*.webp' | while read -r w; do
o="${w%.webp}"
[ -f "$o" ] || continue
ws=$(stat -c %s "$w"); os=$(stat -c %s "$o")
[ "$ws" -ge "$os" ] && echo "$ws $os $w"
done > ~/webp-bigger.txt
wc -l ~/webp-bigger.txt
How did I make the site serve the lighter original?
With the <picture> method, Imagify adds the WebP source only when the WebP file exists on disk. So I deleted nothing: I renamed the 108 heavy files to *.webp.bak-cw. As far as the plugin is concerned they no longer exist, and the browser gets the original PNG or JPG.
- Back up first. On Cloudways, that means an application backup from the dashboard. Keep a copy of the file list too.
- Rename only the files on the list, for example:
mv logo.png.webp logo.png.webp.bak-cw. - Clear the caches: Breeze, Varnish and Cloudflare, so the new HTML is served.
- Check that every image on the page returns 200 and that no image is broken.
- To undo it, restore the original name (remove
.bak-cw) and clear the caches again.
| What I measured | Before (7 Nov 2026) | After (7 Nov 2026) |
|---|---|---|
Homepage: <picture> tags with WebP | 19 | 1 |
| Whole site: WebP versions heavier than the original | 108 files, about 1.36MB | 0 served, the original is served instead |
| Homepage: broken image URLs | 0 | 0, all return 200 |
The one picture tag that remains belongs to a logo where the WebP really is smaller: 4.4KB against 6.3KB for the PNG, according to a curl check on 7 Nov 2026. That is exactly the behavior I wanted: WebP only where it saves weight.
Warning: don’t do this blindly. Back up first, rename only files you have checked, and keep the list so you can undo it. I did not test what happens if you re-run a bulk compression or the plugin’s “generate missing WebP” option. The files may be created again, so run the check again after every such run. For a logo, SVG is usually the better solution.
What is WebP, and how much does it save?
WebP is an image format from Google that compresses better than JPEG and PNG. According to Google’s format page, lossless WebP is about 26% smaller than PNG, and lossy WebP is 25%–34% smaller than JPEG at the same visual quality.
Pay attention to the word “average”. A small PNG with few colors, like a logo or an icon, is already highly compressed. Converting it can add weight, as I saw on my site. AVIF is a newer format that compresses even more, and according to Can I use, about 97% of users worldwide have a browser that supports WebP. In Safari, full support starts with version 16.
| Format | When to use it | Note |
|---|---|---|
| JPEG | Photos, as a fallback for old browsers | Converting to WebP saves the most here |
| PNG | Screenshots, graphics with transparency | For small files, check whether WebP is actually smaller |
| WebP | The default for most images on a site | WordPress accepts uploads since version 5.8 |
| AVIF | When you want to squeeze out more weight | WordPress supports it since version 6.5, if the server supports it |
| SVG | Logos and icons | Vector, small and sharp. Better than PNG or WebP for a logo |
Does WordPress convert to WebP on its own?
No. According to the WordPress team’s announcement for version 5.8, you can upload WebP files, and the smaller sizes are generated in the same format. But a JPEG you upload stays a JPEG. AVIF support was added in version 6.5 and depends on the image library on the server.
To check what your server supports, go to Tools > Site Health > Info > Media Handling. On my Cloudways server, running PHP 8.4, both WebP and AVIF are supported.
How do you convert images to WebP in WordPress, step by step?
I use Imagify, so the steps here are based on it. I have not tested other plugins, so I won’t recommend them. According to the plugin page, conversion to WebP and AVIF is included in the free plan too, up to 20MB of images per month.
- Back up your site before you start. On Cloudways that is an application backup from the dashboard, and it takes a minute.
- Install Imagify from Plugins > Add New and enter an API key (registration is free).
- In the plugin settings, choose the target format: WebP, AVIF or both. I chose WebP.
- Turn on delivery of next-gen formats and choose a method: the
<picture>tag or rewrite rules. Details are in the next section. - Check which image sizes are marked for compression. On my site it turned out that the thumbnail, medium, medium_large and large sizes were not selected. The plugin logged hundreds of “not authorized” errors for them.
- Run Bulk Optimization on your existing images.
- Clear the caches: Breeze, Varnish and Cloudflare if you use them.
- Verify it in practice: open the browser developer tools (F12), go to the Network tab, filter by Img, and look at the Type column to see whether webp arrives. Compare the size against the original as well.
Picture tag or rewrite rules: which delivery method should you choose?
With the <picture> method, the plugin wraps each image in HTML with two versions, and the browser picks one. This works well behind Cloudflare, because the HTML is the same for everyone. The downside: background images defined in CSS are not replaced.
With rewrite rules, the server decides which file to return based on what the browser asks for. According to the changelog on the plugin page, Imagify recommends it for sites without a CDN and notes that picture tags may break layouts. Is your site behind Cloudflare or another CDN? Start with picture.
What about images in Elementor?
Elementor sometimes creates its own resized copies in the uploads/elementor/thumbs folder, outside the media library. On my homepage, which is built with Elementor, six such images were served as plain JPG with no WebP version. Section background images are defined in CSS, and the picture method does not touch them.
What to do: upload the image in advance at the right size and in WebP format, and in the widget choose a size from the media library instead of a custom size. More tips in the guide to a fast Elementor site.
The code BFCM802 takes 80% off your bill for the first two months (up to $200 off per month), including unlimited free site migrations. New customers only, and only until the offer ends.
The offer ends on December 4, 2026 at 23:59 (UTC+2).
Start with a free trial, no credit card. Enter the code at checkout and check that it shows up.
After Black Friday: 30% off for 3 months with the code ASAEL. On a large server (above about $444 a month) ASAEL already saves more today. BFCM802 vs. ASAEL calculator
Start a free trial server, no credit card. When you move to a paid plan, the code ASAEL takes 30% off your bill for the first three months.
The link fills in the code on the signup form. Just make sure it shows up.
Does WebP improve LCP?
Only if the main image gets lighter. LCP is the time until the largest element in the first view appears, and according to web.dev the target is 2.5 seconds or less. On my homepage the main image is marked fetchpriority=”high”, which is correct, but its WebP version was 9% heavier than the PNG. In a case like that, conversion does not improve LCP, so I disabled its WebP and now the PNG is served.
What I did not measure: LCP before and after. That requires changing settings on the live site, and the free PageSpeed check exceeded its daily request quota on 7 Nov 2026. Measuring LCP is explained in the Core Web Vitals guide.
Common mistakes when converting to WebP
Converting everything without checking: small logos and icons can grow. On my site it happened to 23% of the files. Compare sizes as in the check above, then replace them with SVG or disable the heavy WebP.
Compressing only the original image: the browser usually gets a resized version from srcset. If those sizes are not marked for compression, most visitors gain nothing.
Forgetting the cache: after conversion, clear the Breeze, Varnish and Cloudflare caches, otherwise the old HTML is served. More on the Breeze cache in the advanced settings guide.
Counting on Cloudflare to convert: according to the Cloudflare documentation, Polish is available only on Pro plans and above, not on the free plan.
Forgetting fonts: images are only part of the weight. On sites in languages with large custom fonts, such as Hebrew, heavy fonts are a common suspect. See fonts and speed.
Frequently asked questions
You install a conversion plugin, choose WebP as the target format and run a bulk compression on your existing images. WordPress itself does not convert. I use Imagify, where conversion is included in the free plan too.
No. On average it is 25%–34% smaller according to Google, but small, simple files can grow. On my site, on 7 Nov 2026, 108 of 476 WebP files (23%) came out larger than the original, mostly small logos.
AVIF compresses more, but it is newer and needs server support. WebP is supported by about 97% of users. If your server supports both, you can generate both and let the browser choose.
Since version 5.8 you can upload WebP files to the media library. AVIF is supported since version 6.5. In both versions WordPress does not convert existing images on its own.
Because Elementor creates some images in its own folder, and background images are defined in CSS. The picture method does not replace them. Upload the image as WebP at the right size in advance.
Open the browser developer tools, go to the Network tab and filter by images. The Type column should show webp. Compare the size with the original too, because a heavier WebP is a sign you should exclude that file.
Disable it or replace the image, for example with SVG. With Imagify and the picture method, renaming the WebP file (on my site to the .webp.bak-cw extension) makes the site serve the original, and you can undo it by restoring the name. Back up first and clear the cache afterward.
Related guides
- The complete guide to speeding up a WordPress site
- Core Web Vitals: what LCP is and how to improve it
- Advanced Breeze settings
- How to build a fast Elementor site
- Before you choose a server: the full Cloudways review
- All guides on this topic: Speed and performance
Sources: Google: An image format for the Web, WordPress 5.8 adds WebP support, WordPress 6.5 adds AVIF support, Can I use: WebP, Imagify on WordPress.org, web.dev: Optimize LCP, Cloudflare Polish. The measurements on my site were taken on 7 Nov 2026. This guide was written and tested by Asael Dreyer · Updated: 7 Nov 2026
Disclosure: this is an independent site, not the official Cloudways site. Some links on this site are affiliate links: if you sign up through them we earn a commission, at no extra cost to you. Full details