• WordPress development is a never ending and always ongoing process. Useless functions is dropped in favour of better and useful functions. So why earth hasn’t the “unattached” filter used in the Media Library been killed already??? In what way could anyone find some use in this?

    “unattached” is the word used here. But if I understand things correctly this has nothing to do with wether an image is attached to something or not.

    In my world an “attached” image is in some way used in a post or a page (just keeping it to WordPress core functions).

    So, if it’s not used…
    … in the content of a post or page
    … as a featured image in a post or page
    then it would be fair to say that it is unattached.

    But this is not how things works in WordPress. An image is “attached” if it is uploaded to a post, regardless of if it’s used or not. But an image that is fetched from the library and truly used in a posts content is considered “unattached”.

    So, the right word to use here is “uploaded to”, not “attached”. So here comes what seems to be the million dollar question: Why would anyone ever want to know that?

    I want to know if and where an images is used. This is the only thing that makes sense. Why is it not?

    But this function is still with us in version 4.4.2. Why is this? How can one really find some use for this? And why isn’t there a function to let us know if an image truly is used?

    Please let me understand.

    Cheers!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator James Huff

    (@macmanx)

    Attachments have value when it comes to galleries (by default a gallery on a post/page contains all attached images for that post/page), imports (there is an option to automatically import all attached images when importing a WordPress export file), and several plugins.

    Being able to quickly view Unattached images for housekeeping purposes is very valuable to all above scenarios. Ideally, all images should be attached to something.

    Thread Starter dropshot

    (@dropshot)

    For housekeeping purposes this would be valuable. But it isn’t. Since it doesn’t work.

    If one blogger uploads twelve different images to a post and then uses only one of them, the other eleven images wouldn’t be detected as “unattached” and therefor you can’t use that filter for housekeeping purposes.

    Many of the bloggers on my sites are blogging via the mobile app and the images uploaded throught that are all considered “unattached”.

    With housekeeping I assume you mean cleaning out unused images. But how would you use this filter in that purpose? You will have situations where unused images are considered “attached” and truly used images that are considered “unattached”.

    In my meaning, this filter is useless for housekeeping purposes. What you would need is a “used/unused” filter.

    If I’m wrong, please let me know.

    Moderator James Huff

    (@macmanx)

    Just because it doesn’t work for one person’s definition of housekeeping doesn’t mean it won’t for another’s. ??

    By housekeeping, I mean ensuring that images are properly attached for plugin functionality and proper export/import, which seems to be what most of the bloggers I know care about.

    I can see your point too, I just think this will have to be one of those agree-to-disagree things, unless you have a better patch to contribute and the core developers implement it of course: https://make.www.ads-software.com/core/handbook/testing/reporting-bugs/

    WordPress now powers 26.2% of the known web https://w3techs.com/technologies/history_overview/content_management/all/y so it’s never going to be “all things for all people” but it’s sure going to do its best to be “the best thing for most people.” ??

    Thread Starter dropshot

    (@dropshot)

    Of course it doesn’t. I’m fine with that.

    There a few things in WordPress that I would do in a other way. But still I can understand why some people like it this way.

    But this filter I cannot find the reason for keeping. You haven’t convinced me ??

    The term used is one big problem. “unattached” will have people think an image is not connected to any post/page and therefor safe to delete. And you don’t have to search long enough to find plenty of those cases unfortunately.

    So bloggers prefer proper export/import before a clean media library you say? I find it hard to believe. But I’m ok with agree-to-disagree here.

    But with my few points of proof that unused images are considered attached and truly used images are considered unattached you wouldn’t get a proper export/import since depending on where the image is uploaded and not if it is actually used.

    I’m in a export/import situation now where I’m about to rebuild one site and would love it if I could use this filter in a valuable way. The site has some 800 posts with one featured image to every post. The media gallery contains 1000 images. So approximately 200 images are unused. (But 900 images are unattached…) I want to find out which ones are safe to delete.

    Is this a housekeeping purpose where this filter could be used?

    Moderator James Huff

    (@macmanx)

    But this filter I cannot find the reason for keeping. You haven’t convinced me.

    It’s not really something that needs convincing one way or another. It’s just something that is until the developers decide differently, or someone at least submits a patch to change the behavior.

    You just asked why it was that way, and I offered an explanation, that’s all. I’m not saying either one of us is right or wrong, just confirming what is and why it came to be that way.

    Thread Starter dropshot

    (@dropshot)

    Ok. Let’s agree to disagree there as well.

    My original question was why this filter was still here and why anyone would ever want it. What the purpose is. You haven’t convinced me there is a valuable purpose.

    You mentioned proper import/export. But if a proper import/export depends on whether an image is considered attached or not the filter is even worse than expected.

    qboulevard

    (@qboulevard)

    I have twelve pages of images now moved, however, they all came through as unattached. How do I attach every single one of them (as they were before) without doing a massive job manually? Can this be done more easily than going through 12 years of posts (probably 3,000) and finding each image and attaching? I’d have to hire someone willing to spend many hours doing this. There must be a better way!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Unattached images – WHY??’ is closed to new replies.