OrigiSafe — Advanced Image Optimizer (WebP) — Keep Originals Safe
Keep Originals Safe, convert JPEG/PNG images to WebP and makes WebP the canonical file. WP returns .webp URLs, Keeping originals safely archived.
How it works (high level)
-
Convert
- For a JPG/PNG attachment, the plugin generates a WebP for the full image and all WordPress-generated sizes.
- Conversion is done through WordPress’ image editor system (WP_Image_Editor), meaning it uses GD or Imagick (whichever your server supports) with WebP support enabled.
-
Move originals
- The original JPG/PNG files are moved to:
wp-content/uploads/_originals/...
- The folder structure mirrors your uploads structure.
- The original JPG/PNG files are moved to:
-
Update WordPress to serve WebP
- Attachment “file” + metadata are updated so WordPress serves
.webpas the attachment file. - Attachment mime type is updated to
image/webp.
- Attachment “file” + metadata are updated so WordPress serves
-
Optional: Replace old URLs everywhere
- If enabled, the plugin can replace old
.jpg/.pngURLs across:- post content
- postmeta
- Replacement is serialized-safe (does not break serialized arrays).
- If enabled, the plugin can replace old
Background jobs (keeps running after page reload)
Conversion/repair/sweep jobs are designed to run in the background. They keep ticking even if you refresh the page or close the tab.
The plugin uses multiple loopback methods (admin-post / REST / public tick fallback) so it can keep working even on restrictive hosting setups.
Log + “it looks frozen” note
A rolling “terminal style” log is written to:
– wp-content/uploads/hsbc-webp-only/logs/webp-only.log
If the log appears to freeze in the admin page: – click Refresh Log, or – refresh the page
The job may still be running server-side; refreshing the log/page usually catches up.
Usage
Go to Media → WebP Only.
Settings
- Quality
- WebP quality for conversion (0–100).
- Batch size
- How many items to process per tick. Smaller batches reduce server load.
- Replace old .jpg/.png URLs across content + postmeta (serialized-safe)
- Recommended if your site content contains hard-coded image URLs.
- Sweep Include / Exclude
- Used by the Sweep tools to control which folders are scanned.
Conversion Jobs (buttons)
Start Bulk Convert
– Converts Media Library attachments (JPG/PNG) in batches.
– Moves originals to uploads/_originals/.
– Updates attachment metadata so WordPress serves .webp.
– Optional URL replacement (content + postmeta).
Start Repair/Cleanup – Repairs inconsistencies if something was partially converted or moved. – Useful after restores/migrations or if some attachments have mismatched metadata. – Optional URL replacement.
Start Folder Sweep – Scans the filesystem for eligible images (based on your Sweep Include/Exclude rules). – Designed for sites with additional image folders beyond standard uploads. – Optional URL replacement.
Stop Job – Stops the currently running job.
Maintenance / Cleanup (buttons)
Delete duplicate _originals
– Deletes backup files in uploads/_originals/ *only when* an identical file already exists in uploads/.
– This is a cleanup tool for situations where originals were restored back into uploads and you no longer need the archived duplicate.
Delete duplicate _webp
– Removes orphaned WebP cache files in:
– uploads/_webp/
– Only deletes WebP files that no longer match anything in uploads/ or uploads/_originals/.
Delete duplicate sweep _originals
– Maintenance cleanup for non-uploads roots (folders under wp-content/) that contain their own _originals/ folders.
– It uses your Sweep Include list to find those roots.
– Only deletes a file from <root>/_originals/ when the same file exists at <root>/ AND the file size matches (safe duplicate).
Revert Everything
– Restores original JPG/PNG files from uploads/_originals/ back into uploads/.
– Reverts attachment metadata so WordPress serves the originals again.
Log controls
Refresh Log – Pulls the latest log tail into the admin screen.
Reset Log – Clears the log file.
Requirements
- WordPress’ image editor must support WebP.
- GD with WebP support, or
- Imagick with WebP support
- If WebP conversion is not supported on your server, conversion/repair/sweep will refuse to run (revert tools can still work).
