v1.3 — Convert & serve next-gen images (WebP & AVIF) automatically, without breaking any existing site links.
A free, lightweight WordPress plugin to convert and compress existing images (JPG/PNG) to WebP or AVIF — without breaking any existing site links.
Instead of replacing image files, the plugin:
- Generates a
.webp(or.avif) copy of each image alongside the original. - Injects
.htaccessrewrite rules in the uploads folder:- If a browser supports WebP/AVIF (via the
Acceptheader), requests to.jpg/.pngURLs are transparently served the converted file. - If the browser doesn't support it, the original file is served — no broken links, ever.
- If a browser supports WebP/AVIF (via the
- Optionally auto-converts images on upload.
- ✅ Convert existing uploads (bulk) or on-upload automatically
- ✅ Choose WebP or AVIF output
- ✅ Configurable quality (1–100)
- ✅ Zero broken links — original URLs kept, served via
.htaccessrewrite - ✅ Works with GD or Imagick, with manual method selector
- ✅ Supported file extensions selector (JPG, PNG, GIF)
- ✅ Excluded directories with live preview
- ✅ Extra features: Strip EXIF, Remove if larger
- ✅ Expandable file tree with per-folder image counts
- ✅ Nginx config generator
- ✅ WP-CLI support
- ✅ Clean admin UI under Media → Image Optimizer
- WordPress 5.8+
- PHP 7.4+
- Apache with
mod_rewriteenabled (for the redirect magic) - GD with WebP/AVIF support or Imagick
- Clone or download this repo
- Upload the folder to
/wp-content/plugins/ - Activate in Plugins
- Go to Media → Image Optimizer and configure
- Fixed: Start Bulk Convert button was submitting the settings form instead of triggering bulk conversion (missing
type="button"attribute)
- Added conversion method selector (Auto / Imagick / GD) with live availability indicators
- Added supported file extensions toggle (JPG, PNG, GIF)
- Added excluded directories with live fragment preview
- Added extra features: Strip EXIF metadata, Remove if larger than original
- Added expandable file tree with per-folder total / converted / pending counts
- Added
class-wpio-folder-tree.php— recursive folder tree builder
- Initial public release
- Bulk & auto-convert on upload
- WebP & AVIF support
- Background queue via WP-Cron
- Image backup & restore
- Nginx config generator
- WP-CLI commands
- Media Library column with per-image status
- Nginx rewrite rule support
- Per-image conversion status in Media Library
- WP-CLI bulk conversion command
- Image backup/restore before conversion
- Conversion method selector (Imagick / GD / Auto)
- Excluded directories
- File tree with per-folder image counts
- 🚧 Server-side image optimization (coming soon)
- REST API endpoint for headless WordPress use
GPL-2.0+