How to exclude an image from an image gallery in WordPress

The in-built image gallery function in WordPress is very useful, in that you can create great looking image gallleries with a few clicks. Here’s an example below of a WordPress gallery.

An example WordPress Gallery

However, by default WordPress will include every image you include in a post or page to your image gallery. This can be frustrating when you want to show another image but don’t want to include it in your gallery.

How to exclude an image from an image gallery

The trick here is to upload your image into your Media Library first. Once you have uploaded your image to your Media Library just click save, then go back to your post (or page), click the image upload icon and then select your image from the Media Library link. And bingo, you will now be able to add your image without it appearing in your Gallery.

Example picture in a post that is excluded from the image gallery

SEO and WordPress tutorial picture
[hr] [twitter style=”horizontal” float=”left”] [fblike style=”standard” showfaces=”false” width=”450″ verb=”like” font=”arial”]



3 responses to “How to exclude an image from an image gallery in WordPress”

  1. Hi Jamie,

    This is great. Don’t suppose there’s a way that you can have an image as featured image, without it attaching itself in such a way that it inevitably appears in the gallery?


  2. David Sutcliffe Avatar
    David Sutcliffe

    Help – i added a couple of images to a page individually then wanted to put another 2 pictures side by side. I uploaded them to my gallery and added then as no1 and no2 but when i published all the pictures (5 in total) appeared in the gallery rather than just the 2 i was after. Any ideas?

    Thanks in anticipation


  3. Hi Jamie,

    I’ve been looking for a solution to this issue, and like you tried the method you outlined in your post. Unfortunately this doesn’t work, on save and publish the images added from the media library are associated with the post and thusly appear in the image gallery.

    Any additional thoughts you have would be appreciated!