Oneway Image Optimizer
Compress images, serve WebP and AVIF, and optimize your whole Media Library in the background, with private backups of every original.
Install in
Oneway Image Optimizer makes your images smaller without a visible loss in quality. Everything runs on your own server with Imagick or GD: there is no account, no API key and no monthly quota, and no image ever leaves your site.
What it does
- Compresses every image size – JPEG (progressive, optimized Huffman tables), PNG (maximum compression, optional 256-color palette) and WebP. A recompressed file is only kept if it is actually smaller.
- Creates WebP and AVIF versions next to each file (
photo.jpgphoto.jpg.webp,photo.jpg.avif). They are encoded from the original pixels, never from an already compressed copy, and are only kept when they are smaller. - Adaptive quality (Imagick) – finds the lowest quality that still reaches a target fidelity (PSNR), image by image, instead of one fixed quality for everything.
- Optional: convert originals to WebP – replaces the JPEG/PNG file itself with a
.webpfile and updates the attachment and the links in your post content. One click restores the original. - Removes EXIF and GPS data while keeping non-sRGB color profiles, so Display P3 photos keep their colors.
- Scales down huge uploads to a maximum size you choose (2560 px by default).
- Backs up every original in
uploads/oneway-image-optimizer/, in a folder with a random name and with random file names, and protected from direct access. Backups keep the original metadata (including EXIF/GPS), so they are never linked or published. “Restore original” brings back the exact file.
Serving WebP and AVIF
<picture>tag (recommended) – rewrites the images in your pages to<picture>with AVIF and WebP sources, including themes, page builders, blocks and lazy-load attributes. Works on Apache, Nginx, LiteSpeed and behind any CDN, without changing your layout.- .htaccess rewrite – keeps the same URL and picks the format by the browser’s Accept header (Apache/LiteSpeed).
- Nginx – a ready-to-paste configuration is shown in the settings.
Optimizing an existing library
- Background optimization – every few minutes WP-Cron processes a small batch of images and stops, so shared hosting is never overloaded. Interval, batch size and time limit are adjustable, with presets for shared hosting and VPS. You can close the browser.
- Respects your server’s limits – the plugin never raises the PHP time limit. It works within the time your host allows, stops between files before the limit is reached and continues the rest in the next run. Files are written to a temporary file first and only then swapped in, so an interrupted run never leaves a broken image.
- Bulk optimization in the browser – faster while the page stays open, with pause and resume.
- WP-CLI –
wp owio optimize --allfor very large libraries.
In the Media Library
An “Optimization” column and a field in the attachment details show the savings per image, with buttons to optimize, re-optimize or restore the original.
External services
This plugin does not connect to any external service. Images are processed only on your own server with Imagick or GD.
Privacy
The plugin has no account, no tracking and no telemetry, and it does not send anything to any external server. Original images are kept as private backups in your uploads folder (see FAQ) and are deleted when you restore an image or delete the attachment.
Written by Joobi from the project's own listing. See the source page
1.0.1
- Backups moved to
uploads/oneway-image-optimizer/with random folder and file names. - Images are written to a temporary file and swapped in only when complete; an original is never replaced when its backup failed.
- No longer changes the PHP time limit: work stops before the host’s limit and continues in the next run.
- The
<picture>delivery uses the WordPress 6.9 template output buffer. Requires WordPress 6.9. - Shell commands for a server cron are quoted correctly.
- Removed the Remote API engine: images are now always processed on your own server.
1.0.0
- Initial release.
Follow this listing's changes (Atom feed)