Media · Gutenberg

Lightbox Gallery block for WordPress

Image grid where clicking a thumbnail opens a full-screen lightbox with prev/next navigation.

Get Blockenberg

Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.

Get Blockenberg

What it actually does

Image grid where clicking a thumbnail opens a full-screen lightbox with prev/next navigation.

Inspector panels on this block: Images, Layout. Those titles come from index.js, not from a shared template.

Behavior controls: “Image Ratio” options: Square 1:1, Landscape 4:3, Landscape 16:9, Portrait 3:4; “Hover Effect” options: Zoom, Dim, None.

Where to find it

Gutenberg inserter → Media → search “Lightbox Gallery” (block name `blockenberg/lightbox-gallery` in block.json). Style it in the sidebar after insert.

How to use Lightbox Gallery block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Lightbox Gallery”, insert it. Category: Media.
  3. Configure inspector controls that exist on this block. Open Images. Set “Caption”, “Columns”, “Gap (px)”, “Border Radius (px)”.
  4. Check the published page. The view script reads HTML data attributes: data-caption, data-captions, data-lightbox. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
CaptionText field in the inspector.
ColumnsNumeric range control in the inspector. Range 1–6. block.json default: 3. Saved as `columns`.
Gap (px)Numeric range control in the inspector. Range 0–48. block.json default: 12. Saved as `gap`.
Border Radius (px)Numeric range control in the inspector. Range 0–40. block.json default: 8. Saved as `borderRadius`.
Image RatioSelect control; the chosen value is saved on the block. Options: Square 1:1; Landscape 4:3; Landscape 16:9; Portrait 3:4. block.json default: 1/1. Saved as `imageRatio`.
Hover EffectSelect control; the chosen value is saved on the block. Options: Zoom; Dim; None. block.json default: zoom. Saved as `hoverEffect`.
Show Captions in LightboxOn/off toggle in the inspector. Off by default. Saved as `showCaptions`.
Lightbox OverlayColor control in the inspector. block.json default: rgba(0,0,0,0.92). Saved as `overlayBg`.

What the front-end script actually does

When this is the right block

Notes from the implementation

viewScript: this folder’s frontend.js is enqueued on the front end for this block.

FAQ

How do I add the Lightbox Gallery block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Lightbox Gallery”. It sits under Media. After insert, open Images and set “Caption”, “Columns”, “Gap (px)”, “Border Radius (px)”.

What makes Lightbox Gallery different from other Blockenberg blocks?

Image grid where clicking a thumbnail opens a full-screen lightbox with prev/next navigation. Inspector labels on this block include “Caption”, “Columns”, “Gap (px)”, “Border Radius (px)”.

Is the Lightbox Gallery Gutenberg block free?

Yes. Lightbox Gallery ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Lightbox Gallery to match my theme?

Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Images, Layout).

Related media blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Lightbox Gallery from the Gutenberg inserter.

Get Blockenberg