Free on WordPress.org

Product Media Cleaner

Delete a WooCommerce product and its leftover pictures go with it, while images still in use are kept. Free on WordPress.org.

Product Media Cleaner dashboard on a laptop
Type
WooCommerce plugin
Edition
Free on WordPress.org
Version
2.0.3
Works with
WordPress 6.0+ · WooCommerce

Deleted products leave their pictures behind

When you delete a WooCommerce product, WordPress removes the product but leaves its photos in the media library. Over months, stores collect thousands of pictures that no product uses, and nobody wants to sort through them by hand.

Product Media Cleaner does that tidy-up for you. It remembers which pictures belonged to a product, double-checks that nothing else on your site still uses them, and only then removes what is truly unused, with a log of every change.

What happens next

The life of a deleted product

Five quiet steps, none of which you have to do yourself.

  1. You delete a product

    Nothing changes in how you work. Delete products the way you always do.

  2. Its pictures are noted

    The plugin remembers which images belonged to that product before it disappears.

  3. They wait in a queue

    Clean-up runs quietly in the background, so your admin stays quick.

  4. Each picture is checked

    If another product or page still uses an image, it stays.

  5. The rest is removed and logged

    Unused images go, and every change is written to a record you can read.

Removed, or kept. Always written down.

Removed

  • Studio headphonesFrom product #10482
  • Headphones sideFrom product #10482
  • Desk lampFrom product #10479

Kept, still in use

  • Attachment #82016Used as the main image of another product
  • Attachment #82010Used in another product’s gallery
  • Attachment #81997Mentioned inside a page’s content

Example entries with sample data.

One screen, nothing hidden

Product Media Cleaner dashboard showing the queue, settings and logs
Dashboard: queue, controls, settings and logs on one screen
  1. 1

    Queue

    See what is waiting and when it last ran.

  2. 2

    Controls

    Run now, pause, or clear the queue.

  3. 3

    Settings

    Choose how careful the reuse check should be.

  4. 4

    Logs

    Read what was deleted and what was kept.

What you get

  • Automatic clean-upPictures from deleted products are cleared without a manual hunt.
  • Reuse checkImages still used by another product or page are kept, and listed for you.
  • Background queueWork happens quietly in the background, so deleting a product never slows you down.
  • Pause and run nowPause the clean-up, resume it, or run it on demand.
  • Deleted images logSee what was removed, when, and from which product.
  • Kept images logSee which pictures were kept, and why.
  • Orphan tidy-upOptionally clears leftover gallery entries that point at nothing.
  • Clear controlsEmpty the queue, the deleted log or the warnings in one click.
  • Admin-only accessOnly store managers can see or change anything.

Careful by design

Keeps what is still in use

A picture shared with another product or page is never removed. It is kept and shown in the list of retained images.

A record of everything

Every removal is logged with the time, the image and the product it came from.

Back up first

Removed pictures are deleted for good, so keep a regular backup, as you should for any store.

Starts free

The free edition is on WordPress.org, so you can try it on your own store today.

Try it today

Free on WordPress.org

Install it from your WordPress dashboard, or open the plugin page to read the details and reviews.

  • WordPress6.0 or newer
  • PHP7.4 or newer
  • RequiresWooCommerce
  • LicenceGPLv2 or later

Free on WordPress.org and used on live WooCommerce stores.

More projects

View all projects →