How to Create an Image Gallery with WordPress

Disclosure: This post may contain affiliate links. Purchasing a product through one of these links generates a commission for us at no additional expense to you.

Do you make this mistake?

I see a lot of WordPress beginners include long lists of images in their posts when a single gallery block would look much better.

And besides looking better, it’s a more user-friendly experience.

Knowing when to use galleries is one of the best ways to make your site look better.

And the best part is, you don’t even need to add a new plugin.

You can add galleries to any post or page by following a few simple steps.

If you’d prefer to watch the video version, here’s my Youtube tutorial on adding galleries to WordPress.

Subscribe to Compete Themes on Youtube

The first step is to log in to your site and visit the post or page where you’d like to add a gallery.

Once there, open the block selector and inside the Common Blocks section, click on the Gallery block you find there.

Add Gallery Block

Once clicked, you’ll see the gallery block added right away.

Gallery Block

You can upload a new image or use the other button to select an existing image from your Media Library.

Inside the popup that appears after clicking either, you can choose from your newly uploaded images and existing images in your Media Library.

Choose Images

Clicking on an image will add it to your selected images, and if you hover over a selected image, the checkmark will turn into a minus button you can click to remove it.

When you’re happy with the selected images, click the Create a new gallery button at the bottom-right of the popup.

You’ll be taken to this new page where you can reorder the images and add individual captions

Edit Gallery
Images can be reordered with drag-and-drop

You can always reorder the images and add captions later, so click the Insert Gallery button at the bottom-right to continue and you’ll see the gallery inserted into the post.

Example Gallery

That’s all you need to do to add an image gallery to WordPress!

There are a few built-in options to customize the gallery to your liking before you’re finished.

As you saw from the screenshot above, the gallery auto-arranges the images into a few columns.

You can customize the number of columns using the first option in the right sidebar after selecting the gallery block.

Gallery Columns
Drag the slider to the right to increase the number of columns

You won’t get precise control over the layout, but the option to choose the number of columns is normally enough to get the desired presentation.

Besides changing the number of columns, you might also want to turn off the automatic cropping.

Crop Images

Just keep in mind that turning off cropping can lead to some irregular shapes and lines within the gallery.

The last gallery option lets you choose where to link the images.

Link Gallery Images

By default, the images are not linked, but you can link them all to their attachment pages or the media files.

If you aren’t happy with the arrangement of the images, you can hover your cursor over any one of them and click the arrow buttons at the top to reorder them.

Reorder Images

And lastly, you can set a caption for the entire gallery rather than individual images using the caption option at the bottom of the block.

Gallery Caption

Image galleries in WordPress

That’s everything you need to know about adding image galleries to WordPress posts and pages.

While the gallery block included in WordPress is incredibly easy to use, you may want more control over the features and style. In this case, you can check out the plugins by FooPlugins or browse our collection of the best gallery plugins:

The 5 Best Image Gallery WordPress plugins

With those plugins, you’ll be able to add lightboxes, include the same gallery in multiple pages, watermark your images, and a whole lot more.

And if you want to make galleries the center of your website, you might like one of these themes:

Top 13 WordPress Gallery Themes

You’ll find some amazing templates in that collection that will put images and galleries at the forefront of your site’s design.

Ben Sibley
Ben Sibley
This article was written by Ben Sibley. He is a WordPress theme designer & developer, and founder of Compete Themes.