How to Create an Image Gallery in WordPress

163

So you have bought a shiny new digital camera and want to share your photos with the world? But how do you add those images as a gallery in grid and columns instead of one picture at a time? In this article, we will show you how to easily create an image gallery in WordPress that makes your photos look even better.

How to create an image gallery in WordPress

WordPress makes it super easy to add images to your blog posts and pages. You just click on the Add Media button and upload your images.

However, if you are adding multiple images, then all those images will appear one after another. It doesn’t look great, and your users will have to scroll a lot to view them all.

Adding multiple images in WordPress without creating a gallery

By creating a gallery, you can display images in a grid layout with columns and rows. You can show thumbnails for your images, and users can click on them to see the full image.

This way you will be able to show more photos in less space, and it will look a lot more professional.

Preview of a gallery

WordPress actually comes with a built-in gallery feature that many users are not aware of. You can also use WordPress plugins to create even more robust image galleries that look great on all devices and screen sizes.

Having said that, let’s take a look at how to easily create an image gallery in WordPress.

Video Tutorial

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

Method 1. Create an Image Gallery without a Plugin

WordPress comes with a built-in feature that lets you create a gallery. This feature is very basic and does not have many options, but it gets the job done.

Here is how you would create an image gallery in WordPress without using a plugin.

First, you would need to edit the post or page where you want to add the image gallery. On the post edit screen, click on the ‘Add Media’ button to upload your images.

Click on add media button to upload your images

This will bring up the WordPress media uploader where you can click on ‘Select files’ button to upload your photos. You can also select photos you have previously uploaded from media library.

After uploading and selecting your images click on the create gallery link from the left column..

Creating gallery in WordPress

Next, you need to click on the ‘Create a new gallery’ button.

Create new gallery button

Media uploader will now show your selected images with gallery settings. You can add captions to each image in your gallery.

You can also select how you want the images to be linked, number of columns, and image size to use in gallery.

WordPress gallery settings

Once you are done, you can click on the ‘Insert gallery’ button.

This will close the media uploader popup, and you will be able to see your image gallery in post editor.

Image gallery in post editor

You can now save or publish the post/page, and visit your website to see your image gallery in action.

Default WordPress gallery preview

Wasn’t that quick and easy? It looks pretty too. However, if you create image galleries regularly, then you will soon notice that it lacks certain important features.

For example, your images will open in a new page and users will have to click on the back button to view the gallery again. It is not fully mobile-responsive, and your gallery’s appearance depends on your theme. In most cases you get just one very generic style.

Last but not least, you can’t organize your galleries into albums, tag your images, etc.

If you want to add more professional looking image galleries on your site, then you should use this next method.

Method 2. Create an Image Gallery Using Envira

For this method, we will be using the Envira Gallery plugin. It is the best WordPress gallery plugin in the market.

Envira allows you to easily create fully-responsive, beautiful, and modern image galleries in WordPress. It is super fast and comes with many features like lightbox popup, easy image navigation, drag and drop builder, and professional gallery templates.

Let’s get started.

First thing you need to do is install and activate the Envira Gallery plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit the Envira Gallery » Settings page to enter your license key. You can get this key from your account on Envira Gallery website.

Envira Gallery license

After verifying your license key, you can head over to Envira Gallery » Add New page to create your first gallery.

Creating a new gallery in Envira

First you need to provide a title for your gallery and then click on ‘Select files from computer’ button to upload your images.

You can also select files from your WordPress media library by clicking on ‘Select files from other sources’ button.

Once you upload your images, they will appear in the images section.

Images in your Envira Gallery

You can click the pencil icon on a image to add caption, title, and alt text to each image.

Image meta data

Next, you need to click on the ‘Config’ tab.

Here you can change your gallery settings like number of columns, title and caption positioning, margins, heights, thumbnail sizes, image dimensions, etc.

Configure gallery settings

After that, you need to click on the lightbox tab.

The lightbox popup allows users to enlarge images and browse them without ever leaving the page.

The default settings will work very well for most websites, but you can review the options and change them if you like.

lightbox settings

You can now publish your gallery which will make it available to be added anywhere on your WordPress site.

Next, you need to edit a post or page where you want to display your gallery.

On the post edit screen, you will notice the new ‘Add Gallery’ button above the post editor.

Add gallery button

Clicking on it will bring up a popup where you can select the gallery you just created. Simply click to select the gallery and then click on the insert button.

Select and insert gallery

You will see a shortcode for the gallery appear in your post editor.

You can now save and publish your post. After that visit your website to see it in action.

Preview of a gallery created with Envira Gallery

When you click on an image, it will open the image in the lightbox popup. You can browse images in the lightbox by pressing the left and right arrow keys on your keyboard.

Gallery lightbox popup

Your gallery will look equally great on mobile as well. Users will be able to tap on a image to enlarge it and swipe to view the next or previous image.

Gallery preview on mobile

We hope this article helped you learn how to create an image gallery in WordPress. You may also want to see our guide on how to fix common image issues in WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.