Unused Media Finder

Find media files not used anywhere on your site and delete them to reclaim storage space. Clean up orphaned images from deleted posts, old test uploads, and imported content.

Use Cases

  • Find and delete unused images consuming gigabytes of hosting space
  • Identify orphaned files from imported content or removed products
  • Reduce backup size by removing media that’s no longer needed

How It Works

  1. Click “Scan for Unused Media” to analyze your library
  2. Review the list of unused files with previews and sizes
  3. Delete individually or in bulk
  4. Reclaim your storage space

Where to Find It

Access via Switchboard → Media → Unused Media Finder. The module provides a complete scanning and cleanup interface.

What Counts as “Unused”?

The scanner checks if each media file is:

CheckDetails
In post contentLooks for wp-image-{id} class in posts/pages
Featured imageChecks _thumbnail_id meta across all posts

Files not found in either location are flagged as potentially unused.

The scanner checks posts and pages. Files used only in widgets, theme options, or custom plugin fields might be flagged as unused even if they’re actually in use.

Scanning Your Library

Click “Scan for Unused Media” to start. The scan:

  1. Retrieves all attachments from your library
  2. Checks each one against post content and featured images
  3. Returns a list of unused files with details

Scan time depends on library size — a few seconds for small sites, up to a minute for thousands of images.

Review Results

After scanning, you’ll see:

  • Summary — Total unused files found
  • Results table with:
    • Thumbnail preview (or icon for non-images)
    • File title
    • File size
    • Delete button

Deletion Options

Delete Individual Files

Click the Delete button next to any file to remove just that one.

Select Multiple Files

  1. Use checkboxes to select specific files
  2. Click “Delete Selected” to remove them
  3. Confirm the action

Delete All Unused

Click “Delete All Unused” to remove everything the scan found. Use with caution — this is permanent.

Bulk Selection

ButtonAction
Select AllChecks all files in the list
Deselect AllUnchecks all files
Header checkboxToggles all selections

Before You Delete

Always backup your site before bulk deletion. While the scanner is accurate for standard usage, some files might be used in ways the scan doesn’t detect.

Consider these scenarios where files might appear unused but aren’t:

  • Widget images — Used in sidebars or footers
  • Theme options — Logo, background images in theme settings
  • ACF/custom fields — Images in Advanced Custom Fields
  • Page builder backgrounds — Elementor, Divi section backgrounds
  • CSS background images — Referenced in stylesheets

Deletion is Permanent

When you delete a media file:

  • The original file is removed from your server
  • All generated thumbnail sizes are deleted
  • The attachment record is removed from WordPress
  • This cannot be undone

If you’re unsure about a file, download it first or skip it.

FAQ

Will this delete images I’m using?The scanner checks post content and featured images. If an image is embedded in a post or set as featured, it won’t be flagged. However, images used only in widgets, theme options, or plugins might be incorrectly flagged.
Can I undo deletion?No. Deletion is permanent. Always backup before using bulk delete, or delete files one at a time after reviewing each.
Why does this file show as unused when I know I’m using it?The file might be used in a way the scanner doesn’t detect: widgets, theme customizer, custom fields, or page builder settings. Skip files you’re unsure about.
How much space will I save?Varies greatly by site. The file sizes shown help estimate. Remember that WordPress creates multiple thumbnails per image, so deleting one attachment removes several files.
Does this check WooCommerce product images?Product featured images are checked. Product gallery images stored in meta fields may not be detected — verify before deleting product-related images.
Should I run this regularly?Running quarterly or after major content cleanups is reasonable. There’s no benefit to constant scanning unless you’re actively removing content.
PRO

Get access to all 147 modules with a single license

Upgrade to Pro