1. HoustonBrooke

    This is fabulous. I’ve been wanting this for a long time. I hope, if I understand correctly, that I will be able to see if I have an image that isn’t being used at all. If I added an image into a page or post, will it show it’s being used there? Or does it specifically have to be “attached”?
    I always want to see who uploaded it as well. I’m a clean freak and if there’s old images sitting in the library not being used, I want them gone.


    • Jeff Chandler

      Some of the things you want are already available in WordPress. If you browse to the WordPress media library and select Unattached, you’ll be able to see which images are not attached to anything.The Uploaded By and Uploaded To information is coming in WordPress 4.0. What I want is the ability to see every post that is using an image. Right now, I can only see the post the image is attached to. There is a disconnect between the two which is what I’m hoping will be solved with improvements to the way post relationships are handled .


  2. Rebekah McNulty

    I would like a search filter: all images set to ‘featured’.

    Sometimes you want to change theme, and the featured image looks stupid. I’ve tried and suggested that but I don’t think they’ve seen it.


    • swissspidy

      Is there a trac ticket for that? Maybe there was an update in the meantime.

      Otherwise, Sergey’s plugin (see his comment below) could be extended to use a filter like this.


      • Rebekah McNulty

        I’m a somewhat inexperienced user, and I think it was in WordPress.COM I did it, now that I think of it.

        Imported my wp.com blog and now all my photos are unattached. It’s a sad situation.

        I read about the plugin below, but didn’t really get it — how to install it.


  3. Ben

    In regards to replacing/updating media have you tried the Enable Media Replace plugin (http://wordpress.org/plugins/enable-media-replace/)? It allows you to update and replace media just like FTP’ing and replacing the file on the server – but all within the WordPress backend.


  4. Dumitru Brinzan

    I can fully relate to the frustration about media management in WordPress.

    Why can’t an image be attached to multiple posts? Because there are functions that return the ID of the “parent” post/page, so they would have to be altered.
    However, it is not like something like this hasn’t been done before. A post can have multiple tags and categories, but an image can’t belong to multiple posts? Pffff…

    Thankfully there is this plugin, which comes in handy from time to time, though it doesn’t really solve the big problem:


  5. Sergey Biryukov

    > Although you can view the parent post ID the image is attached to, you can’t locate each post the image is used on.

    Your post inspired me to create a plugin which does that.

    It adds a “Used In” column to the list view in Media Library, as well as to the attachment details modal.

    It can find posts that use the image (including any of its intermediate sizes) in post content, or as a featured image. Works with custom post types too.


  6. dlouwe

    Technically there already is a many-to-many relationship between posts and media items (as far as Featured Images go), but it’s not something inherent to posts in general.

    The trouble is that while media library entries are technically posts, and do act like objects in certain contexts, they’re still largely treated as an analog for a static physical file with some metadata on top. This means that much of the UI is focused on making the file upload process easy and possible on-the-fly, and the metadata is minimized and when possible hidden.

    So, if we want to start treating media library entries more like objects with proper recognition of their many-to-many relationships with posts, I feel like there’d need to be a significant re-thinking of how they are treated in the WP Admin. Otherwise it’s either going to complicate the existing upload process (which would be bad for average users) or result in a disjointed and unintuitive process.


  7. karks88

    This would be wonderful to have. I run a number of sites that share the same image/word doc/pdf across several pages or posts. It is a true pain when one of these documents needs to be updated.


  8. mac2net

    LOL plenty of plugins to do these things. Spoiled for choice.


  9. aayler

    Hi Jeff, Thanks for the article.

    Have you seen instances where the image details of an attachment that is created in the post not reflect updates to the metadata, say, caption and alt, performed through the media library?

    Is this the correct behavior such that the attachment to the post is particular and can retain its own, distinct metadata apart from the same attachment in the media library? Or is this a bug?

    Thanks again!


Comments are closed.

%d bloggers like this: