Build a Clean Grid Gallery in the WordPress Block Editor

Build a Clean Grid Gallery in the WordPress Block Editor

The Grid Gallery Block in FolioBlocks helps you create clean, evenly spaced image grids inside the WordPress Block Editor (Gutenberg)  — no short-codes, no settings screens, no fuss.

Note: This guide covers features available in the Professional (Pro) version of FolioBlocks. Some options and settings described here may not be included in the free version.

The Grid Gallery Block is part of the FolioBlocks plugin and gives you a more traditional, uniform grid layout (images in rows and columns) compared to the Masonry layout. Each image in a row aligns to the same height (or width), giving your gallery a tidy, balanced look.

It’s ideal for:

  • Portfolios with consistent image orientations
  • Projects, product showcases, and grid-based visual storytelling
  • Situations where a strict, regular layout is preferred over organic flow

Insert the Block

In the WordPress Block Editor, click ➕ Add Block and search for “Grid Gallery”. You’ll find it under the FolioBlocks section.

Upload or Select Images

View of the Grid Gallery Block initial placeholder.

Choose images via the Media Library or upload new ones. You can select multiple images at once and reorder them with drag-and-drop either directly in the grid or via the List View.

Alignment controls in the block's toolbar allow you choose between your theme's content, wide, and full width settings.

Use the alignment controls in the block toolbar to select Content WidthWide Width, or Full Width, depending on how expansive you want your gallery to go.

Since the Grid Gallery Block renders images as inner blocks you can easily re-arrange images in the gallery by selecting them in the List View (on the left hand side) and dragging and dropping images into your preferred order.

Re-arrange the Grid Gallery by selecting the inner Image Blocks and dragging and dropping into your preferred order.

Image Resolution

Choose among Thumbnail, Medium, Large, or Full — balancing quality and page load performance.

Columns

The Grid Gallery Block is fully responsive and built for modern WordPress. You can define separate column counts for Desktop, Tablet, and Mobile, ensuring your galleries always look balanced.

Randomize Image Order

Enable to reshuffle image order on each page load (great for repeat visitors).

Grid Gallery Block - General Gallery Settings

Gallery Click Settings

As of version 1.3 of FolioBlocks all features related to what happens when you click on a gallery images are grouped into a panel called Gallery Click Settings. Clicking on the Image Click Behavior drop down reveals the following options: None, Open in Lightbox, Enable Image Downloads, Link Image to Media File, Link Image to Custom URL, Link Image to Page/Post, or WooCommerce Product.

Note: WooCommerce Product only displays is WooCommerce is installed and active

Selecting Open in Lightbox in the Image Click Behavior dropdown will activate the Lightbox on the website’s front-end. The Lightbox supports keyboard navigation and swipe gestures.

When Open in Lightbox is selected in Image Click Behavior An additional dropdown titled “Lightbox Content” allows you to select what displays inside of the Lightbox alongside the image. You can select from: None, Show Image Title, Show Image Caption, or Show EXIF Data.

Gallery Click Settings - Open in Lightbox

Enable Image Downloads

Gallery Click Settings - Enable Image Downloads

Selecting Enable Image Downloads in the Image Click Behavior dropdown will make all of the gallery images link to the source file so they are available for download in the front-end of the website.

The Link Target dropdown allows to decide if you want the link to be placed on an icon or on the thumbnail image. The Display Image Download Icon drop down allows you select if the Download icon is always visible or only visible on hover.

Note: With Enable Image Downloads selected an additional control is added into the gallery block’s Styles panel. This control allows you to set the color of the Download icon as well as its background color.

Finally the Enable Lightbox control allows you to toggle the Lightbox on and off. This is only available when Image downloads are set to Link Target Icon. With Enable Lightbox activated a further control allows you set what displays in the Lightbox alongside the image. With Image Title, Caption, and EXIF Data being options.

Link Image to Media File

Selecting Link Image to Media File in the Image Click Behavior dropdown will make all the gallery thumbnails link to their source file. However clicking the link will not trigger a download but open the source file in the browser.

This setting is useful is you want to use a 3rd party Lightbox rather than the Lightbox that is included with FolioBlocks.

Gallery Click Settings - Link to Media File
Gallery Click Settings - Link Image to Custom URL

Selecting Link Image to Custom URL in the Image Click Behavior dropdown will allow you to link the gallery images to custom urls. Linking is done on the individual Image blocks from a search field that is added to their Settings panel.

Note: Images that are not linked will not have an empty hyperlink added.

The Link Target dropdown allows to decide if you want the link to be placed on an icon or on the thumbnail image. The Display Link Target Icon drop down allows you select if the Link icon is always visible or only visible on hover.

Note: With Link Image to Custom URL selected an additional control is added into the gallery block’s Styles panel. This control allows you to set the color of the Link icon as well as its background color.

Finally the Enable Lightbox control allows you to toggle the Lightbox on and off. This is only available when Image downloads are set to Link Target Icon. With Enable Lightbox activated a further control allows you set what displays in the Lightbox alongside the image. With Image Title, Caption, and EXIF Data being options.

Selecting Link Image to Page/Post in the Image Click Behavior dropdown will allow you to link the gallery images to Pages or Posts on your WordPress site. Linking is done on the individual Image blocks from a search field that is added to their Settings panel.

Note: Images that are not linked will not have an empty hyperlink added.

The Link Target dropdown allows to decide if you want the link to be placed on an icon or on the thumbnail image. The Display Link Target Icon drop down allows you select if the Link icon is always visible or only visible on hover.

Note: With Link Image to Page/Post selected an additional control is added into the gallery block’s Styles panel. This control allows you to set the color of the Link icon as well as its background color.

Finally the Enable Lightbox control allows you to toggle the Lightbox on and off. This is only available when Image downloads are set to Link Target Icon. With Enable Lightbox activated a further control allows you set what displays in the Lightbox alongside the image. With Image Title, Caption, and EXIF Data being options.

Gallery Click Settings - Link Image to Page/Post

WooCommerce Product

Gallery Click Settings - WooCommerce Product

Selecting WooCommerce Product from the Image Click Behavior dropdown will allow you to link the gallery images to WooCommerce products in your WordPress website. Linking is done on the individual Image blocks from a search field that is added to their Settings panel.

Note: Option will only be available when the WooCommerce plugin is installed and active. Images that are not linked will not have an empty hyperlink added.

The Default Product Link Behavior dropdown allows to decide if you want the link to add a product to your shopping cart or if you want the link to go to the selected product’s page.

The Link Target dropdown allows to decide if you want the link to be placed on an icon or on the thumbnail image. The Display Add To Cart Icon drop down allows you select if the Link icon is always visible or only visible on hover.

Note: With WooCommerce Product selected an additional control is added into the gallery block’s Styles panel. This control allows you to set the color of the Add To Cart icon as well as its background color.

Finally the Enable Lightbox control allows you to toggle the Lightbox on and off. This is only available when the Link Target dropdown set to Link Target Icon. With Enable Lightbox activated a further control allows you set what displays in the Lightbox alongside the image. With Image Title, Caption, EXIF Data, and WooProduct details being options.


From the Gallery Hover Settings panel you can set if images will display an overlay when you hover over them. The Hover Style dropdown allows you to select from a Blur, Fade, Gradient, Chip, or Color Overlay.

Notes: With the Color Overlay selected you can additionally customize the color of the text and background of the Overlay by going to the Styles panel and the Gallery Hover Styles section.

The Overlay Content drop down allows you to select what displays inside the overlay when you hover above an image. You can select from Show Image Title, Show Image Caption, Show EXIF Data, or Show Product Info.

Notes: Show Product Info option is only available when gallery is linked to WooCommerce.

Gallery Hover Settings

Enable Image Filtering

When filtering is enabled, you can assign categories to images (e.g., “Sports,” “Portraits,” “Events”) and allow visitors to toggle between them.

First you have the Filter Bar Alignment settings which allows you set the alignment of the bar with your added categories (e.g., “All, Sports, Portraits, Events”).

Then you have the Filter Categories input. Here you can add your filter categories (e.g. “Portraits, Events, Landscape”) separated by commas.

Once you have added your categories you can now select the individual images inside your Grid Gallery Block and in their block settings there will be a new Filter Categories dropdown select control where you can apply one of the categories to the image.

Note: Additional style options for the Filter Bar are available in the blocks style settings panel.

The Gallery Filter Settings panel in the Grid Gallery Block.

Advanced Settings

Disable Right-Click on Page

Attempts to disable right-click to discourage casual image downloads.

Note: This makes it harder for casual users to save images, but it’s not foolproof — advanced users can still access media via the browser’s developer tools or view source.

Enable Lazy-Load of Images

When active, images load as the user scrolls, improving initial page load speed.


The Gallery Styles Panel of the Grid Gallery Block.

Background

The Background setting allows you to customize the backdrop behind your Grid Gallery block. You can choose any color from your theme palette or define a custom color to help your images stand out or blend seamlessly with the surrounding layout.

A subtle background tone can make white borders or drop shadows more visible, while a dark background often enhances contrast and gives a cinematic look.

Dimensions – Padding & Margin

The Padding and Margin controls give you fine-grained control over the spacing inside and around your Grid Gallery block.

Use Padding to create breathing room between your gallery content and its edges — useful for highlighting the gallery within a colored background.

Use Margin to control the outer spacing between the gallery and adjacent blocks or page sections, ensuring perfect alignment and balance within your overall page design.


Border Color, Width, & Radius

These settings allow you to add custom borders to the images in your gallery. Select the color of your border and then adjust the border width slider to your liking.

The images in the editor update in real time so you can see how they look without having to visit the front end of the site.

Border Radius slider allows you to add a radius to the corner of the images to further create special effects.

Enable Drop Shadow

Enable Drop Shadow adds a subtle drop shadow to your images that helps them pop off the page.

The Gallery Image Styles panel in the Grid Gallery Block.

Filter Bar Styles 

Filter Bar Styles Panel in Grid Gallery Block

When Enable Image Filtering is active the Filter Bar Styles panel will be present in the Grid Gallery Block’s style panel.

Font-Family, Font Size, Appearance, Line Height, Letter Spacing, Decoration, & Letter Case

When using a block based theme that uses theme.json FolioBlocks will detect available fonts and let you set the font for the Filter Bar. Additional controls allow you to set Font Size, Appearance, Line Height, Letter Spacing, Decoration, and Letter Case styles.

Active – Text Color & Active – Background Color

These two settings allow you to set the color and background color for the active term in the Filter Bar.

Inactive – Text Color & Inactive – Background Color

These two settings allow you to set the color and background color for the inactive terms in the Filter Bar.

Note: The font used in the Filter Bar for Active and Inactive terms is pulled from your theme’s body font.


Below is an example of a Grid Gallery created with FolioBlocks:


Common Questions

How many images can I add?

There are no limits on how many images you can add.

Can I reorder after adding images?

Yes — drag and drop directly in the List View panel.

Does it work with my theme?

For the best experience it is recommended to use a block based theme. However FolioBlocks does work with classic themes provided they support wp_block_styles and the block editor.

Does it work in WordPress 6.x and newer?

Absolutely. All FolioBlocks are built for the WordPress Block Editor (Gutenberg) and fully compatible with modern WordPress releases.


Get Started

Ready to create your first Grid gallery? Get FolioBlocks and start building modern galleries in the WordPress Block Editor today.