Optimize the existing media library
Use Media → Image optimizer only after new-upload testing succeeds. The page is available to administrators while the module is enabled.
Choose the task
| Action | Attachments selected |
|---|---|
| Optimize missing images | Supported image attachments that do not have a completed optimization record |
| Optimize all images | Every supported image attachment, including previously processed files |
Both actions process attachments individually through WordPress metadata generation. Optimize all images deliberately allows a previously processed attachment to run again.
Before starting
- Take a restorable filesystem and database backup.
- Check free disk space for temporary files and WebP companions.
- Record the registered sizes shown on the page.
- Pause other bulk media tools and imports.
- Test a small representative set in staging.
- Plan enough time for one request per attachment.
The initial attachment lookup can be substantial on a large library. Run the operation during a maintenance window and keep the browser page open while progress is displayed.
Run and review
- Click the appropriate task.
- Confirm Start optimizing.
- Keep the page active until Optimization complete appears.
- Review each reported attachment error.
- Open Media → Library in list view and inspect Size Savings.
- Check frontend images, crops, transparent backgrounds, and animated GIFs.
- Purge only image/CDN caches after the files are verified.
An attachment that fails is not marked complete, so Optimize missing images can retry it after the server or source-file problem is corrected.
Stop or repeat safely
Closing the page stops the browser-driven sequence after the current request; it does not undo finished attachments. Reopen the page and use Optimize missing images to continue without intentionally reprocessing successful items.
Use Optimize all images only when a full regeneration is desired. Repeated lossy optimization can change quality and consumes substantially more CPU and filesystem work.