What’s the difference between WordPress’s Media Library and the images I uploaded to posts and pages? Why can’t I add images from the Media Library to galleries in my posts and pages? WP expert Otto explains it like this:
The “gallery” feature is tied to a specific Post. All the images uploaded through the post editor become that specific Post’s gallery. If you upload them through the media section, then they cannot be in a gallery.
Don’t think of a gallery as some separate entity, because it’s not. A “gallery” is simply a bunch of images that are attached to some specific Post. It’s not some thing that you can move images in and out of, it’s not like a photo album or something.
WordPress really has no support for image groupings, albums, or anything similar. The gallery feature merely shows all images that are attached to a specific Post.
Wouldn’t it make more sense to upload all of my images to the Media Library then associate them with whatever post or page as needed, rather than re-upload the same images again and again to each post/page? I’ve had a few clients with this problem exactly, and it’s hard to explain why this doesn’t work. But there is a workaround for adding images to galleries using the
gallery shortcode. Once you have uploaded your image to the Media Library, view the image and get it’s
id from the URL:
Then go to the HTML view of your post/page editor. Add this, replacing the numbers with the
ids of you chosen images:
The gallery shortcode can manipulate any aspect of the gallery, including it’s size, number of columns, position on the page, and the order of the images. Take a look at these other features in the Codex.
Big thanks to Amelie who posted this tip in the comments here at the WPFolio Wiki!