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

  1. Take a restorable filesystem and database backup.
  2. Check free disk space for temporary files and WebP companions.
  3. Record the registered sizes shown on the page.
  4. Pause other bulk media tools and imports.
  5. Test a small representative set in staging.
  6. 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

  1. Click the appropriate task.
  2. Confirm Start optimizing.
  3. Keep the page active until Optimization complete appears.
  4. Review each reported attachment error.
  5. Open Media → Library in list view and inspect Size Savings.
  6. Check frontend images, crops, transparent backgrounds, and animated GIFs.
  7. 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.