Pixellize Image Optimizer
A free WordPress plugin that automatically converts uploaded images to WebP, so your pages load faster and use less bandwidth.
Everything happens on your own server using PHP GD or Imagick. There is no cloud account, no API key, and no paid tier. You upload images the way you always do, and the WebP version is ready immediately.
- Automatic WebP conversion for every new upload, including all thumbnail sizes
- A Keep Original option, with a one-click Restore in the Media Library
- Automatic cleanup of WebP files when you delete an image
- A simple settings page with a savings panel
Requirements
- WordPress 5.0 or higher (tested up to 7.0)
- PHP 7.4 or higher
- PHP GD extension or Imagick extension (most hosts have at least one)
The plugin checks for GD or Imagick on activation. If neither is available it will not activate, and an admin notice tells you what is missing.
Installation
From the WordPress directory (recommended)
- In your WordPress admin, go to Plugins then Add New.
- Search for Pixellize Image Optimizer.
- Click Install Now, then Activate.
Manual upload
- Download the plugin ZIP from wordpress.org.
- Go to Plugins then Add New then Upload Plugin.
- Choose the ZIP, install, and activate.
Quick start
- Install and activate the plugin.
- (Optional) Go to Tools then Pixellize Image Optimizer to review settings.
- Upload images the way you always do.
WebP versions are generated automatically. That is the whole setup.
Settings
All settings live at Tools > Pixellize Image Optimizer.
Image formats to convert
Choose which uploaded formats should be converted to WebP.
- JPG / JPEG and PNG are on by default.
- BMP and AVIF are off by default. Turn them on if you upload those formats.
WebP quality
A slider from 0 to 100. Default is 85.
- 80 to 90 gives the best balance of file size and visual quality.
- Values below 60 can show visible artifacts on detailed photos.
Keep original image
A toggle. Off by default.
- Off: the upload is replaced by a WebP and the original is deleted to save space.
- On: the original stays in your Media Library and a WebP is built for the full image and every thumbnail size. You can restore any image back to its original.
How it works
On upload
When you add an image to your Media Library, the plugin generates a WebP version.
- If Keep Original is off: the upload is replaced by a single WebP and the original is removed.
- If Keep Original is on: the original stays put and a WebP copy is created for the full image and every thumbnail size, so responsive markup is fully covered.
On the front end
The plugin swaps image URLs to the WebP version in the right places:
- Theme image tags (the standard WordPress attachment image)
- The responsive
srcsetattribute - Image URLs inside post content
- The Media Library preview and details
If a WebP is not available for a given file, the original is served instead. Nothing breaks.
If a conversion fails
The original is left untouched and an admin notice appears on the next page load with the file name, MIME type, and a clear reason. Nothing is silently dropped.
Keep Original mode
The default behavior replaces every upload with a single WebP to save disk space. Turn on Keep original image in the settings if you want to:
- Keep your source files in the Media Library
- Be able to restore any image back to its original later
- Offer downloads of original files
With this option on, both formats sit on disk side by side. Visitors are served the lighter WebP automatically, and you keep the originals safe for whenever you need them.
Restore an image
With Keep Original turned on, a Restore original link appears in the Media Library row actions for any WebP attachment that has its original on disk.
Clicking it:
- Points the attachment back at the original file.
- Rebuilds all of its sizes from the original.
- Removes the WebP copies that are no longer needed.
This is the safe way to roll a single image back without touching anything else.
Statistics
The settings page includes a savings panel that shows:
- Number of images converted
- Total original size
- Total WebP size
- Total saved (in bytes and as a percentage)
Use the Reset statistics button to clear the counters and start tracking from zero.
Supported formats
| Format | Default | Notes |
|---|---|---|
| JPG / JPEG | On | Best fit for photos. |
| PNG | On | Works for transparent and non-transparent PNGs. |
| BMP | Off | Turn on in settings if you upload BMP files. |
| AVIF | Off | Needs a server with AVIF read support in GD or Imagick. Best on PHP 8.1+. |
| WebP | Skipped | Already optimized, so the plugin leaves it alone. |
File naming
WebP files mirror the original filename, so the Media Library stays predictable:
photo.jpgbecomesphoto.webpphoto-300x200.jpgbecomesphoto-300x200.webp
If you upload a second image with the same name, WordPress renames the upload to photo-1.jpg as usual, and the WebP follows: photo-1.webp.
FAQ
Does it convert images already in my library?
Is the original image deleted?
Can I get an image back to its original?
What if my server does not support GD?
Can I control image quality?
What happens if I upload a WebP file?
Does it work with my cache or CDN?
Troubleshooting
The plugin will not activate
This usually means neither PHP GD nor Imagick is installed on your server. Ask your host to enable one. Most modern hosts support both.
A specific image failed to convert
The plugin shows an admin notice on the next page load with the file name, MIME type, and a clear reason (for example, a corrupt source file or missing AVIF support). The original file is left untouched so nothing is lost.
My old images are not WebP
Only new uploads are converted in the current release. Re-upload the image or wait for the upcoming bulk conversion feature.
AVIF uploads fail
AVIF reading needs a server where GD or Imagick is built with AVIF support. Some hosts do not include that yet. PHP 8.1 or higher with a recent libavif is the most reliable combination.
Images look soft after conversion
Quality may be set too low. Raise it to 85 or higher in the settings and re-upload the image.
Changelog
0.4
- New Keep Original mode that keeps your source files alongside the WebP for every size.
- New Restore original action in the Media Library for one-click rollback.
- Originals and WebP copies are cleaned up together when you delete an image, so no files are left orphaned on disk.
- WebP is generated for the full image and every thumbnail size, so responsive markup is fully covered.
- Cleaner WebP file names that mirror the original (image.jpg becomes image.webp).
- Redesigned settings page with a savings panel.
0.3
- Tested with WordPress 7.
- WordPress Coding Standards compliance, documented intentional uses of low-level file operations and direct database counter updates.
- Improved error logging for anonymous upload failures (gated behind WP_DEBUG).
0.2
- Admin notices on conversion failure with file name, MIME type, and a clear reason.
- Per-user failure log of the last 10 events, shown on the next admin page load.
- Unique WebP filenames when a same-name image already exists.
- Statistics panel and Reset Statistics button on the settings page.
- Atomic SQL increments for stats, so concurrent uploads no longer drop counts.
- Clean uninstall that removes all plugin options and per-user data.
0.1
- Initial release.
- Auto WebP conversion for JPG, PNG, BMP, and AVIF.
- GD with Imagick fallback.
- Quality control and format selection settings.
- URL replacement across the site.
Support
Need help or want to share feedback?
The plugin is free and open source under the GPL v2 or later license.