1

Image galleries display those images that were uploaded to that post, by default. If I wanted to move an image to a different post, so it appeared there instead, would I have to delete and re-upload? Or, is there a way to re-assign an image that's already in the Media Library?

2 Answers 2

6

This works for me: http://wordpress.org/support/topic/detach-amp-re-attach-media-attachment-images-from-posts#post-1609173

I've saved this as a snippet in my IDE for use in projects. Very handy!

1
  • NICE, man! I'll try this! Sep 21, 2011 at 6:43
0

If the image is in a Gallery you would need to delete it, or exclude it inside the short-code for the gallery.

If it's a single image you could just delete it from that page (not from the media manager). It could be used inside a different page by uploading it.

I'm not aware of a simple way to remove single images from galleries (without excluding it with short-code). I tried the link that posted by:Brian Fegter. It did add a re-attach button but I don't see how that is relevant to this specific question.

4
  • It's relevant to the question in that it reassigns the post_parent column and therefore removes it from the gallery functionality of the original post. The gallery grabs the child attachments of that specific post (via post_parent). If that image's post_parent has changed, Wordpress does not include it in the original post gallery. Sep 21, 2011 at 7:32
  • I didn't try that. If it works I apologize and I'll return to +1 your answer. I've been cursing the default gallery for the lack of control over gallery images. Sep 21, 2011 at 9:35
  • No worries Jared. There are major changes coming to the media management in a future release. I too share your frustrations. One such frustration is if a post thumbnail is set, why does it get placed in the gallery? If a theme displays the thumb, it's displayed a second time in the gallery. Arg :) Sep 21, 2011 at 9:45
  • I stand corrected. It does work. It would be nice to have a way to remove an image directly from the gallery panel, but this will do until or if that happens. Thanks for the tip! Sep 21, 2011 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.