Masonry Layout Guide

A Masonry Gallery is a dynamic photo layout where images sit in a grid with different heights and widths. Each image fits together like bricks in a wall, so the gallery looks well-balanced even when the pictures are not the same size.

Let’s take a look at how to create a Masonry layout gallery in WordPress.

Adding the Masonry Layout Gallery #

Open your desired post/page. Click the plus (+) icon on the editor. Type Galleryberg in the search box. Once the block appears, add it to the editor.

Add the Gallery Block to WordPress

After the block is added, come to the settings tab on the right sidebar. Click the dropdown option under Gallery Layout.

Select the Gallery Layout type

A dropdown list will show up from where you can select the Masonry layout type.

Select the Masonry Layout Gallery type

It’s now the time to add images to the gallery. Choose the Upload option if you want to add images from your local drive, or select Media Library if those images are already on your site.

Choose an option to upload media files

Choose the images you want to show in the gallery. Once they are selected, click the Create a new gallery button.

Select images for the Masonry Layout gallery

In the next screen, you’ll be allowed to write a caption for each image. Do this one by one or leave it blank. Once done, hit the Insert gallery button.

Add caption to the images

The gallery will be created instantly, as you can see below.

The Masonry Gallery is created with Galleryberg

Now, you can add alternative text to the images individually by selecting them one by one.

Add alternative texts to the images of the Masonry gallery

Configuring General Settings #

Select the entire Masonry gallery by clicking the Galleryberg icon on the toolbar. Then, come to the settings tab on the right sidebar.

You can change the number of columns if you want. Next, you may enable/disable the hover effect and lightbox by hitting the toggle button.

Specify the Caption Type where you want to display captions. There are three options: Below Image, Full Overlay, or Bar Overlay.

General settings of the Masonry Layout Gallery

If the Hover Effect and Lightbox are enabled, some more options will appear immediately below. Hope you can explore them alone.

Hover and lightbox options are enabled

Scrolling down the settings tab a bit, you’ll see Caption Visibility to set how the caption will be visible. There are three options. They are: Always Visible, Show on Hover, and Hide on Hover.

Choose the option you like.

Choose the Caption Visibility option for the Masonry Gallery

Customization #

Come to the Styles tab on the right sidebar.

Stylize the Masonry Layout Gallery

Let’s first colorize the gallery. There are three types of colors you can set. They are Background, Caption Color, and Caption Background Color.

You can see that we have already set the color for each of these types.

Colorize the Masonry gallery

Scrolling down the sidebar, you’ll get options to set a color for the border, width, and radius.

Add Border Color and Radius for the Masonry Gallery

From the Block Spacing option, you can add spaces between the images in the gallery.

Add block space to the Masonry Gallery

To get Padding and Marging options, click the three-dot icon next to Dimensions. A small popup will appear. Choose the option you like. For this documentation, we’re selecting the Padding option.

Enable the Padding option for the Masonry gallery

The Padding option will be added to the sidebar. Now, by moving the bar, you can set your desired padding around the Masonry gallery layout. You can see it in the screenshot attached below.

Add padding to the Masonry gallery

Conclusion #

Thus, you can easily create the Masonry layout gallery on the Gutenberg block editor using the Galleryberg plugin. But to get the best results, optimize image sizes, keep file weights light, choose clear thumbnails, maintain visual balance, and test the layout on mobile.

What are your feelings

Updated on January 7, 2026