Automatically deletes attached media from posts and custom post types added via the Media button.
As of April 2026, DX Delete Attached Media is a WordPress post plugin with 4.0K+ active installations and a 4.9/5 rating from 28 reviews. It has been downloaded 54K+ times in total. Requires WordPress 4.5+ and PHP 7.4+. Available on WordPress.org since 2012. Last updated 2 years ago — may have compatibility concerns. Downloads are up 19% this week. Top alternative: Post Type Switcher.
DX Delete Attached Media deletes all of the attached media files to your posts once they get deleted from the system. The standard core behavior deletes posts alone without taking care of related images. Now you can maintain your install and get rid of all solo attachments getting into your posts via the Media button and used nowhere else.
The plugin works with WooCommerce and Easy Digital Downloads.
Where I had a custom code implementation to do what this plugin does – that caused the site to completely destroy itself – this plugin does not. It does what it says without any issues. And its free! Big thank you to the developers. ♥
Unfortunately this plugin deleted media which was used elsewhere on the site.
It deleted media which was used in other posts by the ACF Image Fields and ACF Gallery plugin.
It should not delete media which is used elsewhere on the site.
It does what it says, simple and easy.
I run a classifieds site with thousands of posts and images uploaded by the users. This plugin is a total lifesaver!
The plugin works well, but not delete the “.webp” file type.
Hope the author fix it in next update, but for me is a 5* plugin.
Just install, activate and it does the job.
| WordPress | 4.5+ requiredTested up to 6.3.8 |
| PHP | 7.4+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.