Image optimizer plugin
Install the Reggio Image Optimizer on a WordPress site, connect it with a key, and control what it converts, how visitors get the smaller images and how to undo it.
The Reggio Image Optimizer is a WordPress plugin that makes a smaller WebP copy of each image in the media library, and AVIF as well if you turn it on, then gives that copy to visitors whose browser can read it. Every link to an image keeps working. By default it also keeps one file per new photo rather than two, the way Imagify does with its backups off: see Replacing what you upload.
It needs WordPress 6.0 and PHP 8.1 or later.
Which setup you need
- The site is on our hosting. There is nothing to set up. The account's Image Optimizer page lists each site and installs the plugin with one click. Images are converted on the server the site runs on, the server hands out the smaller copy before WordPress is even reached, and no key is needed. That page says which sites are included.
- The site is hosted anywhere else. Install the plugin yourself and connect it with the account's key. The images are converted on our servers and written back to the site.
Installing it yourself
- Download the plugin from
https://reggiodigital.com/plugins/reggio-image-optimizer/download. The same link is on the Image Optimizer page. - In WordPress, go to Plugins, Add New Plugin, Upload Plugin, choose the zip and activate it.
- Copy the key from the Image Optimizer page. The key appears once image optimization has been added to the account, which a site we do not host needs.
- In WordPress, go to Media, Image Optimizer, paste the key into Reggio key at the bottom and save.
- Press Optimize everything at the top of the same screen to work through the images already in the library. New uploads are converted as they arrive.
Updates come from us and appear in WordPress's own updates screen like any other plugin.
One key, several sites
One key covers every site on the account that is not on our hosting, up to 10. A site joins the list the first time it sends us an image, and the Image Optimizer page shows the list. When it is full, the next site shows an error saying so: remove a site you no longer use from that page to make room. Removing a site never takes away images it already converted.
If a key leaks, replace it on the Image Optimizer page. The old key stops working straight away, so paste the new one into every site that uses it.
What it converts
Everything is on the Media, Image Optimizer screen.
| Setting | Default | Notes |
|---|---|---|
| Photographs (JPEG) | On | |
| Graphics (PNG) | Off | Converting can soften the hard edges in logos and screenshots. Turn it on if the PNGs are photographs. |
| Animations and graphics (GIF) | Off | A moving GIF is always left exactly as it is. |
| AVIF | Off | Adds a second, smaller copy for browsers that support it. |
| New uploads | On | Converts images as they are uploaded. |
| Quality | 82 | Looks the same as the original to the eye. Higher keeps more detail and saves less. |
| AVIF quality | 60 | AVIF has its own scale, and 60 there looks about like 82 above. One number across both formats would make the AVIF copies bigger than they need to be. |
| Photo details | Off | Photos carry hidden camera details, often including the exact location they were taken. They are dropped from the copy we make and kept on the original. Turn it on where copyright details have to travel with the picture. Colours are unaffected either way. |
| How fast to work | Gentle | Converting is work for a server, so it goes slowly by default and gets through a few thousand images a day. Normal and Fast are there for a large library in a hurry. |
| Shrink large photos | Off | Caps the longest side of anything uploaded from here on. A photo off a phone is often several times wider than any space it is shown in. WordPress already caps at 2560 on its own, so leaving this off is the same as picking 2560. Whether the full-size upload is kept as well is the next setting. |
| Replace what you upload | On | Keeps one smaller file for each new photo instead of also keeping the one that was uploaded. See below. |
| Photos already on the site | Off | Does the same to the library you already have. Cannot be undone. |
| Sizes to skip | The Web Stories sizes | Leave particular WordPress image sizes alone. Each size is listed with its dimensions. Sizes made by the Web Stories plugin start out skipped. Untick one if you want it converted. |
| Folders and files to leave alone | Empty | Paths written as they appear after /uploads/, one per line. A folder name covers everything inside it, and * stands in for any text: 2019, brand/logos, *-logo.png. |
| Safety copy | On | Puts a copy of each photograph aside before it is touched, which is what makes freeing up space below recoverable rather than final. |
Skipping a size stops new copies of it. The ones already made stay on the site until you press Remove those copies on the settings screen, which works through the library in the background. Only the copies go, never the original images, and an image whose original was already deleted to free up space keeps its copy, because it is the only one left.
A single image can be up to 32MB.
Conversion runs in the background on WordPress's scheduler, which only runs when someone visits the site. On a quiet site with a big library, the progress on the settings screen can stall. Visiting the site moves it on, and so does the command line below.
Where the files go
Each copy sits beside its original with the new extension added to the end: photo.jpg gets photo.jpg.webp, and photo.jpg.avif when AVIF is on. That is the same naming Imagify uses, so a site moving from Imagify keeps the copies it already has and the plugin picks them up as they are.
The media library gets an Optimized column showing what was saved for each image. Beside it are Undo, which deletes that image's copies, Optimize now for an image that has not been done yet, and Never optimize this one, which leaves that picture alone from then on and removes the copies already made of it. An image left alone can be put back with Optimize this one after all.
How visitors get the smaller image
The Delivery setting decides it.
- Decide for me, the default, rewrites the page unless the server already serves the smaller copy itself, which is how sites on our hosting work.
- In the page wraps each image in a
pictureelement offering the smaller copies, with the original as the fallback. A browser that cannot read WebP or AVIF quietly takes the original. An image is only wrapped when every size in itssrcsethas a copy, so a half-converted image is never shown broken. - My server already handles it leaves the page alone. Choose it only if the web server swaps
photo.jpgforphoto.jpg.webpon its own.
Some images never appear in an img tag: a WooCommerce gallery zoom, a lazy loader or a slider keeps the real address in an attribute and swaps it in with a script. The plugin also rewrites these attributes when a copy exists: data-large_image, data-thumb, data-src, data-lazy-src, data-lazy, data-original, data-full and data-large. Only WebP is used there, because nothing falls back to the original if a browser cannot read the file. A theme that uses a different attribute can add it:
add_filter('reggio_img_url_attributes', fn (array $attributes) => [...$attributes, 'data-hero']);
To keep the plugin away from one image entirely, add data-reggio-skip to its tag:
<img src="/wp-content/uploads/2026/09/logo.png" alt="Logo" data-reggio-skip>
From the command line
With WP-CLI on the server:
wp reggio-images bulk --now
wp reggio-images status
wp reggio-images stats --format=json
wp reggio-images optimize 123 --force
wp reggio-images restore 123
wp reggio-images clear --dry-run
wp reggio-images reclaim --dry-run
bulk queues the whole library, and --now works through it straight away instead of waiting for visitors. stats reports what the library has saved. optimize converts one attachment by its id, and --force rewrites copies that already exist. restore deletes one attachment's copies. clear removes the copies already made of sizes you now skip, and --dry-run reports what would go without deleting anything. reclaim is described next.
Replacing what you upload
On by default for new uploads. When a photo comes in bigger than WordPress's size limit, WordPress makes a smaller version and keeps the full-size file beside it, where no page ever shows it. The plugin deletes that file. When a photo comes in under the limit, the plugin saves the JPEG again at quality 82 instead, and keeps the result only if it is at least 10% smaller, so an image another optimizer has already been over is left alone. Either way the photo ends up as one file, plus its WebP copy.
Photos already on the site applies the same to the existing library, in the background. It is off until you turn it on, because the full-size files are deleted rather than moved aside and cannot be brought back.
What you give up: those photos can no longer be cropped or edited in WordPress at their full camera size. A site that also has Delete the original turned on below still gets its safety copy taken first.
Freeing up disk space
Off by default, and cannot be undone. With Delete the original once we have made the smaller copy turned on, the plugin deletes originals it has already replaced, which on a photo-heavy site is most of the uploads folder. Visitors see no difference and every old address keeps working, because the plugin answers a request for the deleted file with its copy.
It only removes an original when all of these are true:
- Every size of that image has a copy that opens as a real WebP image and is no older than the original.
- A safety copy of the image exists in
wp-content/uploads/backup. An image with no safety copy is left alone.
Safety copies are only made once this setting is on, because nothing else reads them, so a library optimized before you switched it on has none until it has been worked through once. The settings screen says so where it would otherwise report that there is nothing to free. The copies take up roughly what the photographs take up, and freeing the space gives back considerably more than they cost; a site that keeps its own backups and wants the room today can switch them off, at the price of never being able to delete an original.
What you give up: the image can no longer be cropped or edited in WordPress, its Undo link goes away, and removing the plugin leaves only the smaller copies. Run wp reggio-images reclaim --dry-run first to see how much it would free.
Taking it off
Deactivating the plugin stops the page rewriting straight away. Deleting it leaves the converted copies on disk, harmless and unused. Photos it has already replaced stay replaced, and everything else is exactly as it was before.