Create Photo Gallery with WP Native Gallery

flowers photo gallery with ribbon - How to Create Gallery using native WordPress GalleryWant to learn how easily you can create a photo gallery with WordPress? If you like, you can use a plugin for your photo gallery. In the past, I was happy with NextGen Gallery. See below for more on NextGen Gallery vs. native WordPress gallery. In this post I will teach you how to set up a simple photo gallery using the Media Library that comes with WordPress. Then, to make it come alive and fancy, we will add a plugin: Responsive Lightbox. Maybe in a year I’ll decide Responsive Lightbox is not being upgraded or X plugin has better features or Y does a better job, and I’ll switch the lightbox plugin. But my photos will still be in the Media Library, easy to access and use.

Create the Photo Gallery

First, select some photos for your gallery. You should reduce the size of the images for each photo to a pixel width that is comfortable for the viewers – let’s say 600px wide. So using a photo editor tool such as Photoshop or Pixlr, re-size each image you plan to use to 600px by 400px. For the amount of photos to be used in your gallery, select a number that goes nicely into 3 or 4, assuming you want a gallery that is 3 or 4 columns wide. In my case, I am just going to use 4 images, and I will present these in two columns.

Start your page or your post within WordPress. Click on Add Media to add your images. You can add more than one by holding down the SHIFT key (for PC users) or the COMMAND key (for Macintosh users).
upload images to Media Gallery in WordPress

As you add your images, you will notice a check mark appears on the top right of each one. As you add each image, complete the Title, Caption and Alt fields. The lightbox plugin you use may get the data from any of those fields, so it’s easier to complete them as you upload. You can always go back into Media Library later and edit the titles, captions or alt fields.
check images wordpress native gallery
When you are ready to create the gallery, make sure each image you want to use has a check mark next to it. Select Create Gallery button on the left. You are now given the option of numbers of columns. In my case, I’m just using two columns. You might use 3,4,5 or more. In the box that says Link To, select Media.

Here is my gallery:

And here is how the code looks:

<div style="width: 300px;">
[gallery columns="2" link="file" ids="6415,6414,6413,6412"]

The reason I have that div tag with the inline width is if I left it as just the gallery code, the images stretch to the width of the containing div. Since my containing div is wide, my thumbnails were too far apart. So I added a new containing div. If you have enough thumbnails in each row, you won’t have this issue. It’s just because I was only using two columns.

Typically, the photo gallery code will be one line in brackets (called a shortcode), something like this:

[gallery columns="2" link="file" ids="6415,6414,6413,6412"]

Jazz it Up with a Lightbox Plugin

If you click on the gallery above, you will notice you get to the larger version of the image, and then you will have to click the back button to get back to the post. You can’t get to the next photo in the series from the larger image.

If you want something snazzier, try a lightbox plugin. I recently used Responsive Lightbox. Add it like you would any other WordPress plugin. Once you add the lightbox plugin, you will be able to navigate from one larger photo to another. And it will look nicer. Within the Responsive Lightbox plugin, I used the Lightbox script called PrettyPhoto because I liked how it showed the captions. Experiment with the choices you are given in the plugin. Learn more about Responsive Lightbox.

Note: within the Responsive Lightbox settings, Pretty Photo shows the caption on top of the image.

NextGen Gallery vs. Native WordPress Gallery

I used NextGen Gallery plugin for a few years. But then they went through upgrades that were a bit bumpy. I also discovered it was a bit trickier to move a NextGen Gallery than if the images were in the native Media Library. NextGen Gallery also makes your WordPress database larger. So for a site with simple photo needs, sticking with the Media Library and creating a native WP gallery might be preferable.

An advantage to NextGen Gallery that the native WP gallery does not have is you can organize all your photos in galleries and in albums. There are also features like sliders and slideshows. If you have a serious amount of photos to display and organize, check into the details of NextGen Gallery.

Your Turn, Please

Have you ever used the WP native gallery? Did you know it exists? Have you used NextGen Gallery? What is your experience with WordPress and photo galleries?

39 Responses to “Create Photo Gallery with WP Native Gallery”

  1. Becc says:

    I did not know it existed. Will have to have a good play now ;)

  2. Catarina says:

    Good suggestions, Leora.

    Must say that I’m happy with the media library that provides. All pictures I have added since 2009 are there and can be used whenever I feel like it. If I need to make the database larger I will have a look at adding a plugin.

    • Leora Wenger says:

      Catarina, it’s nice to see how WordPress has evolved. Sometimes the core features meet needs – plugins aren’t always the solution. Thanks for commenting on your experiences with WordPress.

  3. I haven’t try this plugin yet, it looks great. I used NextGen Gallery. The next time I will try the WP Native Gallery, thank you!

    • Leora Wenger says:

      WP native gallery isn’t a plugin – it’s part of core WordPress. You can add a lightbox plugin to it, but those are generally much lighter than adding NextGen Gallery. Good to get familiar with both, so you know the pros and cons of each.

      Thanks for commenting, Oksana.

  4. I haven’t had a need to use a larger gallery than the one WP provides, but it’s great to know that NexGen is out there. So far, so good with WP. I generally use 2 picture per post

    • Leora Wenger says:

      Jacquie, not everyone has image intense sites, but if you do have a lot of photos to show on one post, the native WP gallery is an easy method. NextGen Gallery is good for those that have lots and lots of images and need a variety of ways to display those images and need the ability to organize them.

      Thanks for the comment, Jacquie.

  5. Susan Cooper says:

    As you know I us a lot of images… :-). Therefore I have a pretty large photo gallery on WP. What I didn’t know was the information about Lightbox. That will come in very handy. Thank you my friend. :-)

  6. Jeevan Jacob John says:

    Interesting post, Leora :)

    I haven’t tried gallery in WP, although I have tried something similar with Blogger.

    I am planning to use a lot more images on my blog. I hadn’t thought of creating a gallery or using a plugin like this for full screen display, since I am planning to not use sidebars for posts. I am still going to play around with my sidebars, but this feature (and plugin) gives me some freedom and flexibility.

    Thank you for sharing them, Leora :) Appreciate it! Hope you had a wonderful weekend!

  7. Christine says:

    Really interesting post, I had never even heard of either of these, but I have been wondering if there is a better way to load pictures on WP. Thanks for the info!

  8. Mark Brody says:

    I haven’t played with wordpress much, although I have set up a profile. This is good information for when I decide what I would like my blog to look like in upcoming months.

    Thank you for sharing!!

  9. Jason B says:

    I didn’t know this existed.

  10. Jeri says:

    I made galleries a few times using the media library in WordPress. I’ve yet to try a plugin outside of the huge JetPack plugin that comes with WordPress. It offers quite a few interesting layouts for galleries, though I know some people turn JetPack off because it’s such a huge plugin.

    • Leora Wenger says:

      Oh, yeah, you aren’t going to get me to use that big JetPack plugin if I can help it! And no, it doesn’t come with WordPress, but some themes include it.

      Thanks for commenting, Jeri.

  11. I’ve had the NextGen plugin for years but never create a gallery for publication. As I use a lot of stock photos, I’m not sure what value putting together a random gallery would offer my readers. But I’m glad to learn how. Thanks.

    • Leora Wenger says:

      Jeanette, for some, who emphasize writing, photo galleries may not be so relevant. But maybe you have a friend or a client who needs a photo gallery – you can show them this post.

  12. Cheryl says:

    I use the built-in features in my template. It’s nice to have options though. :)

  13. Wow who knew! I’m not sure about using a gallery although there have been a few posts over this last year where I used 3 to 4 photos. It’s great to know that all the photos in my gallery can be used for something else. Who knows how yet! Great inside information, thanks.

  14. Great information. I love the WP gallery because it’s so easy to use. Since I’m just starting in my blogging career I haven’t had any problems with storing pictures, but it’s good to know that if I need to I can always get a little extra help. It might be fun to go back and make a collage of all the blog images.

  15. Ashley says:

    Hi Leora
    Interesting plugins. I have not had the need for a photo gallery – yet. But I am slowly starting to help more people with various needs, and it is nice to know what is out there in case they need it.
    This one looks pretty simple!
    thanks for sharing your experience with it

    • Leora Wenger says:

      Ashley, it’s good to experiment a little on your own – then you can help others with their needs. People might not even realize how a group of images in a gallery can help their business.

  16. Sarah James says:

    Nice and interesting post Leora. I have bookmarked this post so that I would not miss the plugin name when I needed :P


  17. Arleen says:

    Leora these are great tips when you are creating more blogs it is important to have access to your photo gallery. At the present I use media library from WordPress. After reading your article plan to check out Lightbox.

    • Leora Wenger says:

      Arleen, lightbox gives photos a professional-looking touch – though the photos really need to be of decent quality, or else there isn’t much point of highlighting them with lightbox.

      Lots of options for displaying photos and images in general.

  18. Anil Kumar says:


    Well I really don’t know this cool process to add images in wordpress and make look more awesome.

    I’m going try this soon.


  19. bivek says:

    Interesting plugins. I have not had the need for a photo gallery – yet. But I am slowly starting to help more people with various needs, and it is nice to know what is out there in case they need it.

  20. Johnny Bravo says:

    I just started a blog for my new son. Want to also make it a repository for all the photos we take of him. This post was perfect to give me ideas and a plugin. Thanks Leora!

Leave a Reply