Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
WordPress Plugins
View all Guides

How to Create an Image Gallery in WordPress

Last updated on by
Special WordPress Hosting offer for WPBeginner Readers
How to Create an Image Gallery in WordPress

So you have bought a shiny new digital camera and want to share your pictures from last vacation on your WordPress blog? Great idea, but how do you add your images in a professional looking grid-like gallery view? Most folks start searching for WordPress plugins that will help them create a gallery in WordPress, but you don’t really need a plugin for this. WordPress has a built-in gallery feature that a lot of users don’t know about. In this article, we will show you how to create an image gallery in WordPress. The goal is to add your images in a gallery that looks nice and clean. We will also show you how to open your images in a carousel or lightbox view to create an immersive full-screen experience.

Update (4/1/2014): We recommend that you check out Envira Gallery because it allows you to create really robust WordPress galleries (see our tutorial).

Video version of the Tutorial

Creating an Image Gallery in WordPress

First thing you need to do is to create a new post. Alternatively if you want to add the gallery to an existing post, then click to edit that post. Once you are on the post edit screen, you need to click on the Add Media button.

Add Media Button in Posts

This will open the WordPress media uploader. Now you need to click on Create Gallery link that you see on the left side of the screen. To add images to the gallery, you can either upload the images from your computer or choose existing images from your media library (images that you have previously uploaded to your site). All you have to do is select the images you want by clicking on them. This will add a checked mark that you see on each image in the screenshot below.

Uploading images to create a gallery in WordPress

Once you have selected all the images that you want to add in your gallery, click on “Create New Gallery” button in the media uploader. Media uploader will then show your selected images in the Edit Gallery view. Here you can add captions to your images, change gallery settings, and rearrange the order of images by simply dragging and dropping them in the order you want them to appear in. When you are done with editing the gallery, click on the Insert Gallery button.

Add captions and arrange image order for gallery

Clicking on Insert Gallery button will close the media uploader and insert the gallery code inside your WordPress post. If you are using the Visual Editor then you will see a box in post edit area indicating that there is gallery code.

gallery place holder in WordPress post edit area

If you are using simple text editor mode to write your post, then you will see your gallery shortcode. Something like this:

[gallery ids="5,8,6,7,9,10,11,12"]

Check your gallery by clicking on the post preview button. If you are unsatisfied with the look then you can always click on Add Media button to edit gallery settings. You can rearrange order, increase or decrease image columns, add or remove an image or description. Once you are happy with the way it looks, you can publish your post and your gallery will be visible for everyone.

Note: Yes, this technique can be used for pages as well. If you want to add an image gallery to WordPress pages, then follow the same exact method.

Now that we have created an image gallery in WordPress, lets take a look at how to make it look prettier and easier to browse through.

Show Gallery Images in Carousel

The carousel view for images in WordPress gallery is similar to the photo view in Facebook. Originally this feature started out as part of the Jetpack plugin which is a collection of plugins released by However, the problem with the Jetpack is that it requires you to connect your site with even if there is no need to do so. Sometime ago, we decided to fork the Carousel plugin from Jetpack and release it as a standalone plugin for everyone who wants to use it.

Carousel slideshow for WordPress image gallery

To use the carousel for your image galleries, first thing you need to do is install and activate the Carousel without Jetpack plugin. Once you activate it, this plugin will work out of the box meaning you don’t need to configure anything. Just go to your gallery post and click on an image in the gallery to see it in action. Or check out our image gallery below:

There are a few changes you can make to the plugin. To configure it go to Settings » Media scroll down to Image gallery carousel. Here you can choose either a black or white background for carousel view. Or disable exif data or the carousel view itself.

Configuration options for Carousel Image Gallery plugin

There are several other plugins to create amazingly beautiful image galleries with WordPress. However, for most people the default gallery feature is perfect for their needs. If you don’t mind playing with the codes, then check out this cool example of how we extended the default gallery functionality to create a photo album gallery in WordPress. If you find yourself adding a lot of images to your blog or you are a photoblogger, then we highly recommend that you check out showcase of best photography themes for WordPress.

We hope that you found this article helpful and it helped you create an image gallery in your WordPress site. If you have questions or suggestions, then please leave a comment below.

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »


  1. Sandy Little says:

    I have been playing with an image gallery. Once I make the gallery, can I somehow make each image clickable in order to direct people to my posts?

  2. Tamara Groom says:

    Your plugin is a life-saver. I am unable to connect to Jetpack because of a issue with the client’s host and the other lightbox plugins I tried weren’t great. WPBeginner always has an answer, thanks for all you do!

  3. Martha says:

    The gallery seems to default to three images across in my posts, is there any way I could have 4 or 5 images running across in each line?

  4. William Fitch says:

    Thanks for an on-the-button explanation of the gallery. I must’ve tried a dozen other posts, which were all over the place, before I found this one.

    I have a question. Is it possible to bunch the images in a gallery closer together. I’ve tried all sorts and my images remain far apart

  5. Avinesh Shakya says:

    How can i display the the images of the gallery along with caption.

    I want caption of each image in gallery to be stored in variable

  6. Jacques says:

    Why are there no spaces between the images on my page and in the beginning of your tutorial you mention a lightbox but you never get to explaining how to make it as you only cover the carousel part.

    Where can I find this and how can I get the spaced grid option??

  7. Gennie says:

    So does things like social media activity now count for SEO?
    I was told they help because of the Panda Google algorithm refresh
    Added to Digg, someone will like it

  8. dimitris says:

    Thanks, i have used this method several times…

  9. Arabella says:

    How do you delete images from a gallery? I have tried every single thing I can possibly think of and followed all the advice given on the internet, but the images are still there on my home page, even though I have deleted them multiple times from the actual gallery. There are no problems with the Media Library, just the gallery that appears on my home page. If anyone can tell me how to get rid of these pictures, that would be greatly appreciated.

  10. Alan Rubenstein says:

    How do I separate paragraphs in the galleries?

  11. Shawn Johnson says:

    What gallery are you using for the images posted on this page? Love it

  12. Craig Swank says:

    I have created several image galleries which are initially uploaded in alphabetical order – I need to add large groups of additional images from time to time (this is in Word Press dot Com) – Is there anyway to re-alphabetize the entire gallery without being required to “drag and drop” – When adding 100’s of new images that is not an option.


  13. John Byrne Barry says:

    I just discovered this after trying some plug-ins, but the problem I’m trying to address is the same, with this and with the various plugins. Which is how to add a link to the image, so when you click on the image, it takes you to a specific page. Not the media file. Any suggestions? Thanks.

  14. R. Bambang Widiatmoko says:

    Hi, thanks for the tutorial. But how to make gallery from external images?

  15. Freddie says:

    I feel really stupid but just created a gallery page….updated with photos and text….simple enough. Why does “image gallery”, “slide show” and all this other stuff show up at the bottom of the page? I cannot figure out how to delete it. newby at web design.

  16. Mauricio says:

    Absolutely well explained, it’s so helpful, I love it. Thank you so much for this video, great work.

  17. melanie bund says:

    HI, Would be helpful to alot of people if you also suggested a free gallery plugin, rather than advertise a paid plugin

    • Collin says:

      You should have kept reading. They do offer a pretty cool free plugin to add to the existing WP gallery. A nice looking carousel. Did you see?

  18. Miguel Garcia says:

    Thank you very much for the tutorial.

    I have just one question.

    I created the gallery and published it, but when i put the mouse over the picture, it show a red square with two small silver squares that says: “view attachment page’ and “view in full size”

    How can i remove it? I wanna make it like in facebook, that you just put the mouse over, click and see the carousel.

    Is that possible?

  19. Jeff Brown says:

    I did what you suggest above to create a simple gallery on a webpage. It shows up beautifully. However whenever I click on one of the thumb nail images it says : “image cannot be loaded. Make sure path is correct and image exist”.

    • Jeff Brown says:

      Just to clarify, I mean when I click on ANY of the thumbnails in that gallery I get that same error message.

  20. rachel says:

    I have been using the built in gallery for wordpress but recently it has stooped resizing so my images are half off the page where you cant see them

  21. $22800334 says:

    Carousel not working in Page – I downloaded “Carousel Without Jetpack” and created my photo gallery as a new Post and also created photo gallery as a new Page, however, carousel works in the post but not the page. Carousel is enabled in “settings” so why cant I get it to work in Page?

Add a Comment

We're glad you have chosen to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and all links are nofollow. Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.