Attach media to several posts
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.
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.
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 ?
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...
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.
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.
There are plugins existing as the guys mentioned it before. I can also recommend you File Gallery.
RSS feed for this topic
You must log in to post.