In my (earlier) frustration at not knowing what I was doing--still largely the case--I uploaded duplicates and triplicates of various images. I eventually used one of each. Assuming the website will run more efficiently with fewer images in dead storage, although I'm not perceiving slow performance, I'd like to rationalize the media library. So how do I know which images are being used and which are duplicates to be deleted?
1 Answers
Hi Paul,
When you're viewing the Media Library, there are two views: List View and Grid View.
If you switch to List View, you'll see a column titled, “Uploaded to”. When an image is being used on a post or page, that column will contain a link to the post or page where the image is being used. If an image is NOT being used anywhere, it will indicate, “(Unattached) ”.
You can then safely delete any image that is not in use.
You might also check out the Media Cleaner plugin. It cleans your Media Library from any files which aren't being used in your website, as well as any broken entries.
It also has its own internal trash, so you can make sure everything is still working properly before permanently deleting any files.
Hope this helps!
Aha, so that’s what those symbols on the upper left are. Thanks for the info. I’d been afraid to venture up there.
Problem now–nothing major, to be sure, given my minuscule media library at the moment and greater care uploading henceforth–is that a number of media items in my libraries are marked ‘unattached’ while they’re actually attached, thus ruling out Jordy Meow’s Media Cleaner expedient, lest I permanently delete something I’m using in a post.
I’ve read the explanation on one of the WP forums as to why that happens. But all the media used in my widgets are marked ‘unattached’ even though I never edit them once they’ve been uploaded directly to the widgets (but WP resizes them). And I can’t find an explanation for that.
The solution, of course, is simply to attach the media manually. But I’m curious: Are widgets treated differently from posts by WP even though they appear to be treated similarly by Gutenberg? Or is there another explanation for WP’s failure or refusal to automatically attach uploaded media to widgets?
Yes, I’m pretty sure the Media Library only shows images or files that are used within posts or pages, not widgets.