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:
You stay in control of every deletion:
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.