
外掛標籤
開發者團隊
原文外掛簡介
WordPress’ own “Uploaded to” column only tracks where a file was first attached — it says nothing about where a file is actually used. Files referenced from ACF fields, featured images, galleries, widgets, the customizer logo, WooCommerce product galleries or plain URLs in content all look “unattached”, and genuinely unused files look no different from files your site depends on.
Freshet Unused Media scans everywhere a reference can hide and tells you, per attachment, exactly where it is used — or that it provably isn’t.
What it detects
ACF fields: image, gallery, file — including serialized values and repeater/flexible sub-fields, verified via ACF’s own field-key meta
ACF blocks: field values stored inside the block markup, where no URL is ever written
Featured images and WooCommerce product galleries
Block editor content: image blocks, gallery blocks, wp-image-N classes
Classic content: and shortcodes, page-builder shortcodes holding an ID (image="123"), and raw file URLs, including resized variants like photo-300x200.jpg, -scaled files and percent-encoded filenames
Elementor page data
Options and theme mods: site icon, custom logo, widgets, customizer settings — serialized or JSON
Term meta and user meta (ACF fields on categories and profiles)
Term descriptions — an image or an ID in a category, tag or product-category description
Comments and comment meta (a file linked in a reply, review photos)
Excerpts, and unsaved edits held in autosaves
How it works
A Usage column in the Media Library (list mode) with a per-file “Check usage” action
A Usage meta box on the attachment screen showing the evidence: which post, which field, which option — with edit links
A full-library scan (Media → Usage) that batches through your library in the browser, resumable at any time
Safe deletion: delete selected or all unused files, each one re-checked before it goes
Why the answer can be trusted
Deleting media is destructive, so the scan is built to be wrong in one direction only — towards keeping the file.
Ambiguity counts as used. A bare attachment ID in a meta key the plugin has never seen keeps the file. Matches are boundary-checked, so attachment 123 is never matched by wp-image-1234.
Every file is re-checked in the instant before it is deleted. Anything that became used between the scan and your click is skipped rather than deleted, and the result tells you how many were skipped.
A reference in the trash still counts. A trashed post or comment can be restored, so the files it uses are kept.
Files uploaded in the last 24 hours count as in use — an editor may still be placing them — so a clean-up never removes work in progress.
The evidence is shown, not summarised. Every reference is listed with the object it lives in, the field or option it was found in, and a link to go and look: you can check the reasoning before you act on it.
The blind spot is written down. References kept inside a plugin’s own custom database tables cannot be found by any query-based scanner, and the FAQ below names that limit rather than leaving you to discover it.
The “Uploaded to” relation itself is shown as informational evidence but never counts as usage — that unreliable signal is exactly what this plugin replaces.
Thoroughness is the point rather than speed: a first full scan of a large library can take hours rather than minutes. It runs in batches that stop before the PHP time limit and resume where they left off, so a scan always makes progress and never has to be started over.
Extensible
Site-specific detectors can be added via the freshet_unusedmedia_detectors filter; freshet_unusedmedia_is_used gets the final say on any status; freshet_unusedmedia_batch_size and freshet_unusedmedia_batch_seconds tune scan batches; freshet_unusedmedia_upload_grace sets the recent-upload window in seconds (0 disables it).
Part of the Freshet plugin suite. Full documentation: freshet.studio/docs.
