{"id":289568,"date":"2026-03-30T16:01:43","date_gmt":"2026-03-30T16:01:43","guid":{"rendered":"https:\/\/en-ca.wordpress.org\/plugins\/delete-unused-images\/"},"modified":"2026-03-30T16:01:08","modified_gmt":"2026-03-30T16:01:08","slug":"oli-media-cleaner","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/oli-media-cleaner\/","author":14492344,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.5.0","stable_tag":"1.5.0","tested":"6.9.4","requires":"5.8","requires_php":"7.4","requires_plugins":null,"header_name":"Oli Media Cleaner","header_author":"Olivier Bigras","header_description":"Scan and remove unused media files from your WordPress site to free up disk space. Deep scans post content, ACF fields, WooCommerce, Elementor, theme files, widgets, and more.","assets_banners_color":"2d2d2d","last_updated":"2026-03-30 16:01:08","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/bigrat95\/oli-media-cleaner","header_author_uri":"https:\/\/olivierbigras.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":49,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.5.0":{"tag":"1.5.0","author":"bigrat95","date":"2026-03-30 16:01:08"}},"upgrade_notice":{"1.5.0":"<p>Adds Empty Trash, taxonomy image scanning, and live tab count updates.<\/p>","1.4.0":"<p>Fixes all WordPress Plugin Check errors for WP.org compliance.<\/p>","1.3.0":"<p>Adds column sorting and file type filter.<\/p>","1.2.0":"<p>Adds search functionality to filter images.<\/p>","1.1.0":"<p>Adds Trash All button and scheduled auto-cleanup.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":{"icon-256x256.png":{"filename":"icon-256x256.png","revision":3494793,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-772x250.png":{"filename":"banner-772x250.png","revision":3494798,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.5.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3494793,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3494793,"resolution":"2","location":"assets","locale":""}},"screenshots":{"1":"Main dashboard with stats cards and scan button","2":"Unused media list with bulk actions","3":"Whitelist tab","4":"Scan sources information panel"},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[3786,17705,84,227565,146945],"plugin_category":[50],"plugin_contributors":[256856],"plugin_business_model":[],"class_list":["post-289568","plugin","type-plugin","status-publish","hentry","plugin_tags-cleanup","plugin_tags-disk-space","plugin_tags-media","plugin_tags-media-cleaner","plugin_tags-unused-images","plugin_category-media","plugin_contributors-bigrat95","plugin_committers-bigrat95"],"banners":{"banner":"https:\/\/ps.w.org\/oli-media-cleaner\/assets\/banner-772x250.png?rev=3494798","banner_2x":false,"banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/oli-media-cleaner\/assets\/icon-256x256.png?rev=3494793","icon_2x":"https:\/\/ps.w.org\/oli-media-cleaner\/assets\/icon-256x256.png?rev=3494793","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/oli-media-cleaner\/assets\/screenshot-1.png?rev=3494793","caption":"Main dashboard with stats cards and scan button"},{"src":"https:\/\/ps.w.org\/oli-media-cleaner\/assets\/screenshot-2.png?rev=3494793","caption":"Unused media list with bulk actions"}],"raw_content":"<!--section=description-->\n<p><strong>Oli Media Cleaner<\/strong> scans your entire WordPress site to find media files that are no longer in use. It performs a deep analysis across multiple sources to accurately determine which files are safe to remove.<\/p>\n\n<h4>What Gets Scanned<\/h4>\n\n<ul>\n<li><strong>Post &amp; page content<\/strong> \u2014 all post types, Gutenberg blocks, classic editor<\/li>\n<li><strong>Featured images<\/strong> \u2014 all post types including WooCommerce product variations<\/li>\n<li><strong>Custom fields (post meta)<\/strong> \u2014 any plugin or theme that stores attachment IDs or URLs<\/li>\n<li><strong>ACF (Advanced Custom Fields)<\/strong> \u2014 image, file, gallery, repeater, flexible content, group, clone fields, and Options pages<\/li>\n<li><strong>WooCommerce<\/strong> \u2014 product galleries, variation images<\/li>\n<li><strong>Elementor<\/strong> \u2014 page builder widget data<\/li>\n<li><strong>Theme files<\/strong> \u2014 PHP, CSS, JS templates scanned for hardcoded image references<\/li>\n<li><strong>CSS background images<\/strong> \u2014 inline styles in post content<\/li>\n<li><strong>Widgets<\/strong> \u2014 image, gallery, text, custom HTML widgets<\/li>\n<li><strong>Site identity<\/strong> \u2014 site logo, site icon, theme mods<\/li>\n<li><strong>Serialized data<\/strong> \u2014 deep scan of complex plugin data structures<\/li>\n<\/ul>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Batch scanning<\/strong> \u2014 processes 50 attachments per batch to avoid timeouts<\/li>\n<li><strong>Whitelist<\/strong> \u2014 protect files you want to keep even if unused<\/li>\n<li><strong>Bulk actions<\/strong> \u2014 trash, whitelist, restore, or permanently delete multiple files at once<\/li>\n<li><strong>Trash All<\/strong> \u2014 one-click batch trash of all unused images with progress bar (handles thousands)<\/li>\n<li><strong>Scheduled auto-cleanup<\/strong> \u2014 enable daily, twice daily, or weekly automatic scan and trash via WP-Cron<\/li>\n<li><strong>Progress bar<\/strong> \u2014 real-time scanning progress<\/li>\n<li><strong>No external dependencies<\/strong> \u2014 uses native WordPress admin styles, no Bootstrap or jQuery UI<\/li>\n<li><strong>Zero custom database tables<\/strong> \u2014 stores data in WordPress options<\/li>\n<li><strong>Clean uninstall<\/strong> \u2014 removes all plugin data on deletion<\/li>\n<\/ul>\n\n<h4>How to Use<\/h4>\n\n<ol>\n<li>Go to <strong>Oli Media Cleaner<\/strong> under <strong>Media<\/strong> in the WordPress admin sidebar<\/li>\n<li>Click <strong>Scan for Unused Media<\/strong><\/li>\n<li>Review the results in the <strong>Unused<\/strong> tab<\/li>\n<li><strong>Whitelist<\/strong> any files you want to keep<\/li>\n<li><strong>Trash<\/strong> files you don't need<\/li>\n<li>Go to the <strong>Trash<\/strong> tab to permanently delete or restore files<\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>oli-media-cleaner<\/code> folder to <code>\/wp-content\/plugins\/<\/code><\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress<\/li>\n<li>Go to <strong>Oli Media Cleaner<\/strong> under <strong>Media<\/strong> in the admin sidebar<\/li>\n<li>Click <strong>Scan for Unused Media<\/strong> to start<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"is%20it%20safe%20to%20delete%20unused%20media%3F\"><h3>Is it safe to delete unused media?<\/h3><\/dt>\n<dd><p>The plugin moves files to WordPress trash first. You can review and restore them before permanently deleting. We recommend making a full backup before any bulk deletion.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20acf%3F\"><h3>Does it work with ACF?<\/h3><\/dt>\n<dd><p>Yes. The plugin uses the ACF API to discover all field groups and recursively scans image, file, gallery, repeater, flexible content, group, and clone fields \u2014 including ACF Options pages.<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20woocommerce%3F\"><h3>Does it work with WooCommerce?<\/h3><\/dt>\n<dd><p>Yes. Product featured images, gallery images, and variation images are all detected as \"in use.\"<\/p><\/dd>\n<dt id=\"does%20it%20work%20with%20elementor%3F\"><h3>Does it work with Elementor?<\/h3><\/dt>\n<dd><p>Yes. The plugin scans Elementor's <code>_elementor_data<\/code> post meta for image references.<\/p><\/dd>\n<dt id=\"does%20it%20scan%20theme%20files%3F\"><h3>Does it scan theme files?<\/h3><\/dt>\n<dd><p>Yes. All PHP, CSS, and JS files in the active theme (and parent theme) are scanned for hardcoded references to <code>wp-content\/uploads\/<\/code>.<\/p><\/dd>\n<dt id=\"what%20about%20images%20hardcoded%20in%20theme%20templates%3F\"><h3>What about images hardcoded in theme templates?<\/h3><\/dt>\n<dd><p>Those are detected by the theme file scanner. It finds both URL paths and <code>wp_get_attachment_image()<\/code> function calls.<\/p><\/dd>\n<dt id=\"can%20i%20whitelist%20images%3F\"><h3>Can I whitelist images?<\/h3><\/dt>\n<dd><p>Yes. You can whitelist individual images or use bulk select to whitelist multiple at once. Whitelisted images are never flagged as unused.<\/p><\/dd>\n<dt id=\"does%20it%20create%20custom%20database%20tables%3F\"><h3>Does it create custom database tables?<\/h3><\/dt>\n<dd><p>No. The plugin uses WordPress options only. Clean and lightweight.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.5.0<\/h4>\n\n<ul>\n<li>Renamed plugin from \"Delete Unused Images\" to \"Oli Media Cleaner\"<\/li>\n<li>New slug: oli-media-cleaner, new prefix: olimc_<\/li>\n<li>Added \"Empty Trash\" button \u2014 batch-deletes all trashed attachments with progress bar<\/li>\n<li>Added taxonomy image scanning: WooCommerce category thumbnails, term descriptions, attribute descriptions<\/li>\n<li>Added termmeta deep scan for images stored by third-party plugins<\/li>\n<li>Live tab count updates during Trash All and Empty Trash batch operations<\/li>\n<li>Fixed trash tab count not updating after single\/bulk trash, delete, or restore actions<\/li>\n<\/ul>\n\n<h4>1.4.0<\/h4>\n\n<ul>\n<li>Fixed all WordPress Plugin Check errors<\/li>\n<li>Proper output escaping (esc_html_e, esc_html__, esc_html)<\/li>\n<li>Translators comments for all placeholder strings<\/li>\n<li>Ordered placeholders (%1$d, %2$d) for multi-placeholder strings<\/li>\n<li>Fixed SQL preparation: inline $wpdb-&gt;prepare(), esc_like() for LIKE queries<\/li>\n<li>Dynamic file type filter (only shows detected extensions)<\/li>\n<li>Per-page selector (20, 50, 100)<\/li>\n<\/ul>\n\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>Clickable column headers to sort by Name, Size, Type, or Date (asc\/desc)<\/li>\n<li>File type filter dropdown (JPG, PNG, GIF, WebP, SVG, PDF, MP4)<\/li>\n<li>Sort indicators (arrows) on active column<\/li>\n<li>Filters, sort, and search all reset when switching tabs<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>Added search box to filter images by name, filename, type, or ID<\/li>\n<li>Search works across all tabs (Unused, Whitelist, Trash)<\/li>\n<li>Search clears automatically when switching tabs<\/li>\n<\/ul>\n\n<h4>1.1.0<\/h4>\n\n<ul>\n<li>Added \"Trash All Unused\" button \u2014 batch-processes all unused images with progress bar<\/li>\n<li>Added scheduled auto-cleanup via WP-Cron (daily, twice daily, or weekly)<\/li>\n<li>Settings panel for enabling\/disabling auto-cleanup and choosing frequency<\/li>\n<li>Native WordPress admin UI refinements (postbox, form-table, nav-tab-wrapper, widefat)<\/li>\n<li>Reduced custom CSS from 500+ lines to ~20 lines<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<li>Deep scanning: post content, featured images, post meta, ACF fields, WooCommerce, Elementor, theme files, widgets, site identity<\/li>\n<li>Whitelist feature with bulk actions<\/li>\n<li>Trash and permanent delete with bulk actions<\/li>\n<li>Progress bar during scan<\/li>\n<li>\"What was scanned?\" info panel<\/li>\n<li>Native WordPress admin UI \u2014 no external dependencies<\/li>\n<\/ul>","raw_excerpt":"Scan and remove unused media files from your WordPress site to free up disk space.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/289568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=289568"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/bigrat95"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=289568"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=289568"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=289568"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=289568"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=289568"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=289568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}