Linux 软件免费装
Banner图

MediaPrune – Media Cleaner & Unused Image Remover

开发者 sandcircuit
更新时间 2026年11月2日 13:49
PHP版本: 8.1 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media library cleanup unused images media cleaner delete unused images

下载

1.0.0

详情介绍:

MediaPrune is a media cleaner for WordPress. It finds the images, videos, PDFs and other files in your media library that nothing on your site uses, so you can delete them and free up disk space without breaking any pages. Most media libraries fill up over time with unused images: old uploads, replaced product photos, test files and leftovers from deleted posts. Each upload also creates several resized copies, so one forgotten image can take up a lot of space. MediaPrune finds these files, shows you what can go, and lets you remove them in a few clicks. Why MediaPrune How it finds unused media A scan checks every place that can point to a file: Any file used in one of these places is kept. Review before you clean Every unused file is listed with a preview, file size and upload date, and is ticked for cleaning. Untick anything you want to keep. You can search by file name, filter by images, video, audio or documents, switch between grid and list views, and see how much space your selection will free up. Files you untick stay unticked in later scans. Quarantine or delete permanently Uninstalling MediaPrune restores everything in quarantine before it removes the plugin's own data. Credits The admin screen's line icons are based on the Lucide icon set (ISC licence). The licence notice is in third-party-licenses.txt.

安装:

  1. In your WordPress admin, go to Plugins → Add New, search for "MediaPrune", then install and activate it.
  2. Go to Media → MediaPrune and click "Scan media library".
  3. Review the list of unused files, untick anything you want to keep, then click "Move to quarantine".

屏幕截图:

  • List view, filtered to images, with search and file type filters.
  • Moving files to quarantine: they can be restored for 30 days.
  • The Quarantine tab: restore any file in one click.

常见问题:

How do I delete unused images in WordPress?

Install MediaPrune, go to Media → MediaPrune and run a scan. It lists every image and file nothing on your site uses. Review the list, then move the files to quarantine. They're deleted for good after 30 days, or straight away if you choose "Delete now".

Is it safe? Can it delete an image that is still in use?

MediaPrune checks your posts, pages, custom fields and site settings, and keeps any file it isn't sure about. It can't see files referenced from outside the database, such as an image hard-coded in a theme's CSS or PHP, or linked from another website. That's why cleaned files go to quarantine first: look over your site after cleaning, and restore anything that's missing. Developers can mark such files as used with the mediaprune_used_attachment_ids filter.

Does it work with WooCommerce, ACF and page builders?

Yes. MediaPrune reads custom fields, which is where WooCommerce stores product galleries and where ACF and page builders store images, so files used there are kept.

Does it work with images served from a CDN, or with WebP copies?

Yes. Files are matched by their path, so CDN URLs, resized copies, -scaled originals and WebP versions all count as uses of the original file.

Will it free up disk space?

Yes. It removes each file from the server along with every resized copy, not just the media library entry. The review screen shows how much space your selection will free.

Where do quarantined files go?

Into a folder inside your uploads directory, named mediaprune-quarantine- plus a random suffix, protected by an index.php and an .htaccess file that blocks web access. While a file is in quarantine, it's hidden from the media library.

Does it slow down my site or send data anywhere?

No. MediaPrune loads only on its own admin screen, adds nothing to your site's front end, and makes no outside requests.

What does it need from the server?

PHP must be able to write to the uploads folder directly, which is the case on most hosts.

更新日志:

1.0.0