Backup & Restore

Keep your original images safe with automatic backups

Compresso automatically backs up your original images before optimizing them, so you can always restore to the uncompressed version.

How Backups Work

When an image is optimized, Compresso saves a copy of the original file to a dedicated backup directory (wp-content/uploads/compresso-backups/). This happens automatically before every optimization — no configuration needed.

The backup directory mirrors your uploads folder structure. For example, an image at uploads/2024/12/photo.jpg gets backed up to uploads/compresso-backups/2024/12/photo.jpg.

Restoring a Single Image

To restore an individual image to its original, uncompressed state:

  1. Find the image in the Compresso images table or your Media Library
  2. Click Restore

When you restore an image, Compresso:

  1. Copies the original back — Replaces the optimized file with the backed-up original
  2. Removes optimization data — Clears all Compresso metadata from the image so it shows as unoptimized
  3. Deletes generated WebP and AVIF files — Removes any WebP or AVIF versions that were created for the main image and all its thumbnail sizes
  4. Regenerates thumbnails — Rebuilds all WordPress thumbnail sizes from the restored original, updating dimensions and file sizes
  5. Updates global stats — Decrements your total optimized count, total savings, and WebP count to reflect the restoration

After restoring, the image appears as unoptimized and can be re-optimized at any time with different settings.

Restoring All Images (Clear Data)

To restore every optimized image back to its original and reset all Compresso data:

  1. Go to Compresso > Settings
  2. Find the Clear Data tool
  3. Click to start the process

This cannot be undone. It restores all originals, removes all optimization metadata, deletes all generated WebP/AVIF files, and resets your stats to zero.

This operation runs in the background via Action Scheduler — each image is queued as a separate task, so it won't time out even on sites with thousands of images. You can track progress from the settings page.

Clear Data cannot run while a bulk optimization is in progress. Pause or wait for it to complete first.

Storage Considerations

Backups use additional disk space — roughly equal to the size of your original images before compression. If storage is a concern:

  • Monitor your compresso-backups directory size
  • Consider using Cloud Backup (Pro) to offload originals to Google Drive or Dropbox
  • Once you're confident in your compression settings, you can remove old backups manually

Don't delete the compresso-backups directory manually while Compresso is active — use the plugin's restore features instead, so Compresso can update its internal records.

On this page