{"id":347253,"date":"2026-08-06T09:31:17","date_gmt":"2026-08-06T09:31:17","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/safe-auto-delete-attachments\/"},"modified":"2026-08-06T09:31:08","modified_gmt":"2026-08-06T09:31:08","slug":"ethwebs-media-cleanup","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/ethwebs-media-cleanup\/","author":16152665,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.2.9","stable_tag":"1.2.9","tested":"7.0.3","requires":"5.8","requires_php":"","requires_plugins":null,"header_name":"Ethwebs Media Cleanup","header_author":"Sanmatiraj","header_description":"Automatically deletes attached media and thumbnails when a post is permanently deleted, and provides a safe batch scanner with results pagination.","assets_banners_color":"","last_updated":"2026-08-06 09:31:08","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/wayanad.co.in","header_plugin_uri":"","header_author_uri":"https:\/\/wayanad.co.in","rating":0,"author_block_rating":0,"active_installs":0,"downloads":41,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.2.9":{"tag":"1.2.9","author":"sanmathiraj","date":"2026-08-06 09:31:08"}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.2.9"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3636381,"resolution":"1","location":"assets","locale":"","width":885,"height":383},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3636381,"resolution":"2","location":"assets","locale":"","width":664,"height":148},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3636381,"resolution":"3","location":"assets","locale":"","width":1175,"height":279}},"screenshots":{"1":"Admin Settings Page - Configure protected keywords and subfolders.","2":"Existing Orphaned Media Scanner - Live batch scanning progress and controls.","3":"Pagination &amp; Selection UI - Browse discovered orphans with page-by-page selection."}},"plugin_section":[],"plugin_tags":[9703,274612,253777,233,268613],"plugin_category":[],"plugin_contributors":[272158],"plugin_business_model":[],"class_list":["post-347253","plugin","type-plugin","status-publish","hentry","plugin_tags-auto-delete","plugin_tags-delete-attachments","plugin_tags-media-cleanup","plugin_tags-media-library","plugin_tags-orphan-images","plugin_contributors-sanmathiraj","plugin_committers-sanmathiraj"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/ethwebs-media-cleanup.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/ethwebs-media-cleanup\/assets\/screenshot-1.png?rev=3636381","caption":"Admin Settings Page - Configure protected keywords and subfolders."},{"src":"https:\/\/ps.w.org\/ethwebs-media-cleanup\/assets\/screenshot-2.png?rev=3636381","caption":"Existing Orphaned Media Scanner - Live batch scanning progress and controls."},{"src":"https:\/\/ps.w.org\/ethwebs-media-cleanup\/assets\/screenshot-3.png?rev=3636381","caption":"Pagination &amp; Selection UI - Browse discovered orphans with page-by-page selection."}],"raw_content":"<!--section=description-->\n<p>Ethwebs Media Cleanup keeps your WordPress Media Library tidy automatically. When you permanently delete a post, the plugin scans for its featured image and embedded images, verifies they are not used anywhere else on your site, and safely removes them along with all generated thumbnail sizes.<\/p>\n\n<h4>Key Features<\/h4>\n\n<ul>\n<li>Automatic deletion of featured images and content images upon post purge.<\/li>\n<li>Safeguards shared images (will not delete if used in another post or page).<\/li>\n<li>Keyword &amp; Subfolder protection to protect logos, site assets, and advertisements.<\/li>\n<li>Built-in Existing Orphaned Media Scanner with AJAX batching to handle 30,000+ images without server timeouts.<\/li>\n<li>Chunked batch deletion system with real-time statistics counter and Cancel Deletion support.<\/li>\n<li>Pause and Resume controls for long-running media library scans.<\/li>\n<li>Client-side UI pagination (25 items per page) to ensure smooth browser rendering on massive media libraries.<\/li>\n<li>Flexible selection controls: choose \"Select Current Page\" for page-by-page cleanup or \"Select All (All Pages)\" for bulk purging.<\/li>\n<li>Interactive checkboxes for safe manual approval before deletion.<\/li>\n<li>Completely lightweight with zero external dependencies.<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>ethwebs-media-cleanup<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress.<\/li>\n<li>Go to 'Settings' -&gt; 'Media Cleanup' to configure protected keywords or run an orphan scan.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"does%20this%20delete%20images%20when%20i%20move%20a%20post%20to%20trash%3F\"><h3>Does this delete images when I move a post to Trash?<\/h3><\/dt>\n<dd><p>No. Deletion only occurs when you permanently delete a post by clicking \"Delete Permanently\" or \"Empty Trash\".<\/p><\/dd>\n<dt id=\"will%20it%20delete%20my%20site%20logo%2C%20header%20assets%2C%20or%20sidebar%20ads%3F\"><h3>Will it delete my site logo, header assets, or sidebar ads?<\/h3><\/dt>\n<dd><p>No. You can define custom protected keywords (e.g., ad-, logo, banner, header) or protected subfolders under the settings page to prevent specific media from ever being deleted.<\/p><\/dd>\n<dt id=\"should%20i%20protect%20media%20using%20image%20titles%20or%20actual%20filenames%3F\"><h3>Should I protect media using image titles or actual filenames?<\/h3><\/dt>\n<dd><p>Always use the actual <strong>image filename<\/strong> (or file path URL) rather than the attachment title! Protection rules check the physical file name on your server (e.g., <code>company-logo.jpg<\/code> or <code>ad-sidebar.png<\/code>). If you add <code>logo<\/code> or <code>ad-<\/code> to your protected keywords list, any file containing those terms in its filename or URL path will be automatically skipped and preserved.<\/p><\/dd>\n<dt id=\"how%20does%20the%20scanner%20handle%20sites%20with%20tens%20of%20thousands%20of%20images%3F\"><h3>How does the scanner handle sites with tens of thousands of images?<\/h3><\/dt>\n<dd><p>The scanner uses a chunked AJAX batch processor (50 images per request) on the server, paired with DOM pagination (25 items per view) on the frontend. This prevents both server timeouts and browser freezing.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.2.9<\/h4>\n\n<ul>\n<li>Updated all prefixes from emc_ to ethwmc_ (6 characters) to meet WordPress.org minimum 4-character prefix requirement.<\/li>\n<\/ul>\n\n<h4>1.2.8<\/h4>\n\n<ul>\n<li>Renamed plugin to Ethwebs Media Cleanup using established brand identifier.<\/li>\n<li>Separated inline JavaScript to an enqueued admin.js file.<\/li>\n<\/ul>","raw_excerpt":"Automatically deletes attached media and thumbnails when a post is permanently deleted, while protecting shared images, logos, and advertisements.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/347253","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=347253"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/sanmathiraj"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=347253"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=347253"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=347253"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=347253"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=347253"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=347253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}