Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add a lightbox to a WordPress gallery, use the Gallery block’s built-in Enlarge on click option. Visitors can open an image in a larger overlay and move through gallery images without leaving the page; no plugin is required for this basic behavior.

Turn on the Gallery block lightbox

  1. Open the page or post in the WordPress block editor. Add a Gallery block from the block inserter, or type /gallery and press Enter.

  2. Upload images or select existing images from the Media Library. Arrange them in the order you want using the image controls or List View.

  3. Select the Gallery block itself—not just one image—to open its gallery-wide settings. In the Link options, choose Enlarge on click. WordPress describes this as opening images in a larger lightbox without leaving the page, with navigation between gallery images. WordPress Gallery block documentation

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  4. Set the layout to suit the page. Gallery settings include columns, image resolution, and cropping. When Enlarge on click is enabled, you can also choose whether the lightbox navigation buttons use icons, text, or both.

  5. Preview the page as a visitor and open images in the gallery to check the result.

Gallery lightbox versus an individual image

The Gallery block setting applies to the gallery. WordPress also documents an Enlarge on click option for the standalone Image block, but that setting concerns an individual image rather than gallery-wide behavior. WordPress Image block documentation

Theme-level control for the Image block

Theme developers can configure lightbox behavior for the core Image block through settings.blocks.core/image.lightbox in theme.json. WordPress Developer Resources documents this setting as available from WordPress 6.4: enabled controls whether Image block lightbox behavior is enabled, while allowEditing controls whether users see a per-image editor option. This configuration is scoped to core/image; it should not be treated as a setting for every Gallery plugin or custom gallery implementation. WordPress Developer Resources: Image block settings

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

When to consider a lightbox plugin

Start with the core Gallery option if it meets your needs. Consider a plugin only if you need behavior the built-in control does not provide or your current gallery implementation lacks that option. Plugins have their own setup and compatibility considerations; they are not required to enable the native Gallery block lightbox.

Check for overlap with native behavior

Some plugins use Gallery block link settings or can conflict with WordPress’s native click behavior. For example, the EC Lightbox listing describes a workflow involving a class and Gallery block link settings, and warns that native click/lightbox behavior can override the plugin if it remains enabled. Its listing gives requirements of WordPress 5.0 or later and PHP 7.0 or later, and recommends a block-based setup. Check the current listing and your site’s configuration before following plugin-specific steps. EC Lightbox on WordPress.org

Verify current plugin details

WordPress.org lists Lightbox for Gallery & Image Block as a plugin for the standard Gallery and Image blocks. The listing representation consulted reports version 1.16.1, more than 20,000 active installations, and testing up to WordPress 7.0.6; plugin versions, installation counts, and compatibility information can change. Check the current listing before installing. An installation count is not evidence by itself of a plugin’s quality, safety, performance, or suitability. Lightbox for Gallery & Image Block on WordPress.org

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.