Convert existing WordPress images to WebP and AVIF retroactively
A newly installed plugin initially converts only new uploads. The biggest effect is in the existing stock – that needs a bulk run across the whole media library.
A newly installed image optimization plugin initially converts only what is uploaded from then on. WebP and AVIF are modern image formats that produce smaller files than JPEG and PNG at the same quality; for browser support see Can I use: AVIF. But the biggest effect is in the existing stock: the hundreds or thousands of images already in the media library. For that you need a bulk run that goes through the existing files once and creates a WebP and AVIF variant for each.
Why the existing stock is often the bigger lever
Anyone who has blogged for years or runs an established shop uploaded most images long ago – often as large JPEGs, sometimes without suitable intermediate sizes. These are exactly the images that still appear in old posts, in the category overview, in the archive. Without retroactive conversion, half the site stays slow.
What matters in a bulk run
- Convert all registered image sizes, not just the original – the intermediate sizes are what gets served.
- Control server load: run the conversion in blocks, ideally at a low-traffic time.
- Keep the originals: create WebP/AVIF as additional variants, do not overwrite the original – in case you want to reconvert later.
- Automatic fallback: older clients still get the original or WebP.
- Large libraries: A command-line route (WP-CLI) is more robust than the browser because it is not bound by the web server’s time limits.
WP-CLI is the command-line interface of WordPress (WordPress Command Line Interface).
Before the bulk run
- Back up the media library and the database.
- Choose a low-traffic time.
- Start a test run with a few images and check the result on the frontend.
- Convert the rest in blocks.
- After the run, spot-check old posts and the archive.
Where IMG Performer fits in
The Pro version of IMG Performer includes exactly this retroactive scan: it goes through the existing media stock, creates WebP and AVIF for all sizes, and can script this via WP-CLI even for very large libraries. Processing runs locally, with no per-unit cost. The free version converts new uploads; the bulk run for the existing stock is part of Pro. Background: Image optimization without the cloud.
For large libraries the run can be started via WP-CLI. A dry run for 500 images without write access looks like this:
wp imp convert --dry-run --limit=500
Summary
- A new plugin initially converts only new uploads; the existing stock needs its own bulk run.
- In the bulk run, convert all image sizes, keep the originals and work in blocks.
- For very large media libraries WP-CLI is more robust than the browser.
- IMG Performer Pro converts the existing stock locally with no per-unit cost; the free version converts new uploads.
Install IMG Performer for freeView IMG Performer Pro
Disclaimer
As of September 2026. Details on IMG Performer: img-performer.enfants.de.
Frequently asked questions
Are my posts updated automatically, or do I have to re-insert the images?
The posts stay unchanged. On delivery, the WebP or AVIF variant is served instead of the original – without you touching the post.
How long does a bulk run take?
That depends on the number of images and the server performance. As an order of magnitude: a few minutes for a small blog, several hours for a large shop – which is why it runs in blocks.
Does this take up twice the storage?
WebP and AVIF are added as extra files, but they are smaller than the original. Storage use grows somewhat as a result. How much depends on your images and the quality level.
What does converting the existing stock cost?
With IMG Performer Pro there are no per-unit costs, processing runs locally on your server. Pro costs €69 a year or €9 a month.