WordPress.org

Ideas

Attach media to several posts

  1. Fabien Quatravaux
    Member

    Today you can attach a media to one post, and upload a media without attaching it. Non attached media can then be attached to a post via the Media menu by clicking on the "attach" link. Why not displaying this "attach" link even if the media is already attached to a post to allow it to be attached to several posts ? This could also permit to change the parent post without re-uploading the file.

    Technically speaking, I know that the field "post_parent" in the wp_posts table is used to register this parent-child link, so it is not possible to have several parents. To work around this, we could use a meta field called "wp_media_parent" that could have several instances for each attachment. To keep the backward compatibility, the first occurence of the meta key could have the same value as the post_parent field.

    Posted: 3 years ago #
  2. MRWweb
    Member

    12345

    This is just my $0.02, but I think that the multiple ideas to implement a usable taxonomy on media would be more flexible than this proposal and could be used to accomplish the same things (and more!). I do see where the "attachment" paradigm could be useful and more intuitive than a taxonomy, but it just seems like more of an edge case than image taxonomy.

    Posted: 3 years ago #
  3. I don't see your point mrwweb. How a taxonomy could be used to attach a media to more than one post at a time ?

    Posted: 3 years ago #
  4. Ipstenu (Mika Epstein)
    Half-Elf Support Rogue, Volunteer Forum Mod & Plugin Referee

    The media would be connected via the taxonomy, which is what could be called instead of the attachment? That's a spitball guess mind you...

    Posted: 3 years ago #
  5. MRWweb
    Member

    12345

    You could just create a "gallery" of attachments with a tag. Attachments can have multiple tags so can belong to multiple "galleries." I think my bigger point is that I think attachments would get confusing if they both could be attached to multiple things AND gained taxonomy terms, and I think the latter is more useful/flexible than the former. I really lie the end-point of your idea, I just wonder whether multiple parents is the best way to get there.

    Posted: 3 years ago #
  6. version interactive
    Member

    File Gallery plugin allows you to attach/detach and manage images from your posts.

    You can also attach all attachments from another post id you find the ID.

    https://wordpress.org/plugins/file-gallery/

    Posted: 1 year ago #
  7. Schneefraese
    Member

    There are plugins existing as the guys mentioned it before. I can also recommend you File Gallery.

    Posted: 8 months ago #
  8. criclover
    Member

    @version thanks for sharing tihs plugin. It solved my issue with this one problem of attachments my blog

    Posted: 1 month ago #
  9. Thanks for this plugin . First this idea clicked my mind about this problem also but @version thanks for sharing this plugin

    Posted: 1 month ago #
  10. le mie nozze
    Member

    12345

    @MRWweb: I do not think it would cause confusion!

    I like this idea.

    Posted: 1 month ago #

RSS feed for this topic

Reply »

You must log in to post.

  • Rating

    12345
    26 Votes
  • Status

    This idea is under consideration