Honeill Media Duplicate Manager

Description

Media Duplicate Manager helps you clean up large WordPress media libraries. It finds duplicate images, lets you choose which copy to keep, repoints the references it can find to that image, and then (optionally) deletes the duplicates.

It works in two ways:

  • Exact duplicates are detected with a SHA-256 hash, so matches are byte-for-byte identical files.
  • Similar images are detected with a lightweight perceptual visual hash — useful for compressed, resized, or re-exported versions of the same picture.

You stay in control of every deletion:

  • Pick one master to keep per group (the most-used image is recommended, oldest as a tie-break).
  • Tick only the copies you want deleted — leave the rest and they are kept untouched.
  • “Keep all” dismisses a group you have decided are not duplicates.
  • A confirmation dialog shows how many files will be affected before anything is deleted.

Before deleting, the plugin repoints common references, including every generated image size (-300x200, etc.), in post content, featured images, gallery shortcodes, WooCommerce product galleries, ACF fields (image, gallery, repeater and flexible content sub-fields, and options pages), and serialized post/term/user meta and options.

Always test on a staging site with a full database and uploads backup before deleting on production. Reference replacement is best-effort; some page builders store image IDs inside JSON or cache their own rendered output and may need a manual refresh.

Disclaimer: You use this plugin entirely at your own risk. Always keep a current backup of your database and uploads, and double-check your site before and after merging. The author accepts no responsibility or liability for any data loss or site issues.

Installation

  1. Upload the honeill-media-duplicate-manager folder to /wp-content/plugins/, or install the ZIP via Plugins > Add New > Upload Plugin.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to Media > Duplicate Manager.
  4. Run the Exact Duplicate scan to completion, review a group, choose a master, tick the copies to delete, and merge.
  5. Run the Similar Image scan and review matches manually.

FAQ

Will deleting a duplicate break images on my pages?

The plugin repoints the references it can find — including resized image URLs — to the master before deleting. To be safe, use a staging site and a backup first, and consider the “Safe mode” setting, which repoints references without deleting the files.

Does it delete anything automatically?

No. Nothing is deleted unless you tick a copy and confirm. You can keep all or just some versions of any group.

What image types are supported for similar matching?

JPEG, PNG, GIF, and WebP. Other types (for example SVG) are indexed for exact matching but skipped for visual matching.

How do I undo a dismissed group?

Open the Settings tab and choose “Show dismissed groups again”.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Honeill Media Duplicate Manager” is open source software. The following people have contributed to this plugin.

Contributors

Changelog

0.4.0

  • Added ACF support: image, gallery, repeater and flexible content sub-fields, and options pages are repointed on merge (they were already stored as plain post meta, so this was largely already working — this release fixes the part that wasn’t).
  • Fixed a caching bug where, after a merge, ACF’s get_field() (and other cached meta reads) could keep returning the old, deleted attachment ID until the object cache was cleared elsewhere. Post, term, user and options caches are now invalidated immediately after each reference is repointed.
  • Deep usage scan setting description now explicitly calls out ACF field coverage.

0.3.1

  • Branded the admin menu label (Media Honeill Duplicate Manager) and tidied the plugin description.

0.3.0

  • Renamed all option, post meta, transient, CSS class and script-global names to a unique honeill_ / honeill- prefix to avoid any conflict with other plugins or themes.
  • Added an explicit backup / use-at-your-own-risk disclaimer to the description and the admin screen.

0.2.1

  • Added GPL license headers and a WordPress.org readme.
  • Added translators comments for all translatable strings with placeholders.
  • Hardened and documented dynamic-table SQL with an internal allowlist; centralized request input handling.
  • Removed manual text-domain loading (WordPress loads translations automatically for hosted plugins).

0.2.0

  • Repoint all resized image URLs (and scheme/root-relative and escaped-slash forms) on merge.
  • New keep/delete UI: choose one master, opt in to deleting individual copies, or keep all.
  • Reliable batch scanning with progress that never drifts or stalls, plus “Scan all remaining”.
  • Transitive (union-find) similar-image clustering and faster distance checks.
  • Cached usage counts, optional deep usage scan, confirmation dialogs, safe (repoint-only) mode, and uninstall cleanup.

0.1.0

  • Initial release: exact (SHA-256) and visual-hash duplicate detection with manual review.