HK Media Optimizer
·
Find and remove unused media files from your Media Library — built to run in lightweight batches so it never overloads your server.
HK Media Optimizer scans your WordPress Media Library and tells you exactly which files are no longer used anywhere on your site, so you can safely delete them and reclaim disk space.
Unlike heavier media-cleaning tools, HK Media Optimizer is built around a simple rule: never do more work in one request than necessary. Every scan runs in small, configurable batches over AJAX, so it works comfortably even on modest shared hosting.
Where it checks for usage:
- Post and page content
- Featured images
- Direct attachment relationships (files uploaded into a post)
- Custom fields / post meta
- Advanced Custom Fields (ACF) values, if ACF is active
- Widgets, including block-based widgets
- Theme Customizer settings (logo, background, header image)
- Site icon
Built for control:
- Turn any scan source on or off
- Protect recently uploaded files with a configurable safety window
- Whitelist specific files or whole folders
- Exclude file types you never want flagged (PDFs, ZIPs, etc.)
- Adjust batch size to match your server’s resources
- Optional “type DELETE to confirm” safeguard before permanent removal
Find duplicate files:
- Compares every file in your library by its actual contents (not just filename), so true duplicates are found even if they were re-uploaded under a different name
- Groups duplicates together and shows how much space each group is wasting
- Always keeps at least one copy from every group — server-side, even if you select every file in a group for deletion
Export & reporting:
- Export your unused, in-use, or full scan results to a CSV file at any time
- Optional scheduled scans (daily/weekly/monthly) with an email summary report — nothing is ever deleted automatically by a scheduled scan
Lightweight by design:
- No data is sent to any external server — everything runs locally on your site
- Scan results are stored in their own dedicated database tables, not in
wp_postmetaorwp_options, so your site’s core tables stay fast - Assets (CSS/JS) only load on the plugin’s own admin screens, never elsewhere in wp-admin
- No background cron jobs running on a schedule unless you explicitly turn on Scheduled Scans in Settings
