How to Create a Masonry Gallery in WordPress

May 18, 2026 5 Minutes
How to create a masonry gallery in WordPress using peLightbox Gallery Slider plugin

If you want to display your images in a modern Pinterest-style layout, a masonry gallery is one of the best options for WordPress websites. With the peLightbox Gallery Slider plugin, you can easily create responsive masonry galleries with lightbox effects, sliders, and video support — without writing any code.

In this tutorial, you’ll learn how to create a masonry gallery step-by-step using WordPress and the peLightbox Gallery Slider plugin.

What Is a Masonry Gallery?

A masonry gallery arranges images in columns with different heights while keeping the layout balanced and visually appealing. Unlike standard grid galleries, masonry layouts remove empty gaps between images.

This style is commonly used for:

  • Photography portfolios
  • Travel blogs
  • Creative agencies
  • Product showcases
  • Fashion websites

The plugin supports masonry layouts along with responsive lightbox popups and mobile-friendly navigation.


Why Use peLightbox Gallery Slider?

The plugin includes several gallery and slider options such as:

  • Masonry galleries
  • Grid galleries
  • Carousel sliders
  • Lightbox popups
  • YouTube & Vimeo galleries
  • Touch and swipe support
  • Elementor compatibility

It also works well with popular page builders including Elementor and WPBakery.

How to Create a Masonry Gallery in WordPress

Step 1 – Install the Plugin

First, install the plugin from your WordPress dashboard.

  1. Login to your WordPress admin panel
  2. Navigate to Plugins → Add New
  3. Search for peLightbox Gallery Slider
  4. Click Install Now
  5. Activate the plugin
pelightox gallery plugin install and activation

You can also download it directly from:

peLightbox Gallery Slider on WordPress.org


Step 2 – Create a New Gallery

After activation:

  1. Open the plugin dashboard
  2. Click Add New Gallery
  3. Upload your images
  4. Add titles or captions if needed
peLightbox Dashboard

Image upload pelightbox

The plugin allows unlimited image galleries and supports responsive layouts.


Step 3 – Configure the Masonry Layout

The default gallery layout is Masonry, so in most cases you don’t need to change the layout type.

Inside the gallery settings you can configure options such as:

  • Image spacing
  • Thumbnail sizes
  • Hover effects
  • Additional layout settings

These options allow you to adjust the appearance of your masonry gallery and control how images are displayed.

The masonry layout automatically arranges images with different heights into balanced columns, creating a clean and dynamic gallery.

Pelightbox Option


Step 4 – Enable Lightbox Effects

One of the best features of the peLightbox Gallery Slider plugin is its built-in lightbox functionality, allowing visitors to view images in a fullscreen popup.

Available features include:

Free Version

  • Lightbox popup
  • Basic navigation between images

Pro Version Features

  • Swipe navigation for mobile devices
  • Fullscreen mode
  • Zoom effect
  • Advanced lightbox controls

These features create a smooth viewing experience on both desktop and mobile devices.


Step 5 – Publish the Gallery

Once your gallery is ready:

  1. Save the gallery
  2. Copy the generated shortcode

Example:

[pelightboxgallery id="49"]
  1. Paste the shortcode into:
    • Posts
    • Pages
    • Elementor widgets
    • WPBakery modules
pelightbox shortcode in tenxomony

Video Tutorial 

Tips for Better Masonry Galleries

Use Mixed Image Sizes

Masonry galleries look more dynamic when images have different heights.

Optimize Your Images

Compress images before uploading to improve loading speed.

Enable Lazy Loading

The plugin supports lazy loading for faster performance.

Add Captions

Captions improve SEO and provide better context for visitors.


Mobile Responsive Design

The gallery is fully responsive and supports:

  • Swipe gestures
  • Touch navigation
  • Mobile lightbox mode
  • Responsive columns

This ensures your masonry gallery looks great on all devices.

  May 18, 2026   Gallery & Slider WordPress Tutorials

We're are pixelonetry creative studio! we make great digital assets for professionals...

Post a Comment

Developers from over 150+ countries are developing products with Our Themes