DX Delete Attached Media deletes all of the media files to your posts once they get deleted from the system.
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..
Upload 'dx-delete-attached-media to the wp-content plugins directory or find via the Plugins admin section.
Activate the plugin through 'Plugins WordPress.
If you want to disable the functionality, disable the plugin from the Plugins section...
It works for all of your deleted posts, as long as you delete them from the system.
Keep in mind that the soft delete sends your post to Trash first, and deleting the media would happen once your Trash is being emptied...
It does what it says and now I can delete my posts and be rest assured that the attached images are deleted as well saving me some realestate in my storage.
WISHLIST It would be great if this can be expanded to be able to find images in page post inserted using builder and not 'Add Media button so that when page or post is deleted, those images are gone as well...
Browse the code, check out SVN repository, or subscribe to the development log by RSS...
Read more