Lightbox for Gallery & Image Block
This WordPress Plugin adds a simple & lightweight Lightbox to the standard WordPress Gallery & Image Block. It detects if a post contains a Gallery or Image Block and then loads & initialize baguetteBox.js, a pure JavaScript Lightbox script without any dependencies and a modern minimal look. There is no lock in effect. It does not add a new Block Editor/Gutenberg Block and relies solo on the standard WordPress Gallery and Image Block. You can deactivate this plugin at any time and your Gallery and Image Blocks will work as they’ve done before. Just without the lightbox. Just one important thing to remember: You always have to select Link → Link to image file or Link images to media file (see screenshots below) for all of your Image & Gallery Blocks to work properly. If you choose None or Link to attachment page it will not work. But that’s fine if you don’t want the Lightbox for a specific Image or Gallery. Take a look at the YouTube video from Jakson where he reviews this plugin: Features Here are the features of baguetteBox.js: Written in pure JavaScript No dependencies (e.g. jQuery) Image captions support Responsive Supports swipe gestures Around 13 KB, 7 KB gzipped Works with Gallery Block (Default Block) Image Block (Default Block) Media and Text Block (Default Block) Gallery (Default Classic Editor Gallery) CoBlocks Gallery Collage / Masonry / Offset / Stacked Meow Gallery (+ Gallery Block) Don’t forget to select Link to → Media File for all of your Galleries & Images to work properly. Notice: At the moment, just Blocks inside a post are supported. Not Blocks in a Widget. You can make it work but have to enqueue the necessary style & script yourself. See FAQ –> How to enqueue the necessary assets (script & style) for blocks outside of posts or for block types that are not supported by default?
Top keywords
- block13×4.19%
- gallery12×3.87%
- image9×2.90%
- blocks5×1.61%
- default5×1.61%
- link5×1.61%
- work5×1.61%
- image block4×1.29%
- lightbox4×1.29%
- block default3×0.97%
- block default block3×0.97%
- default block3×0.97%
Responsive Block Controls
Responsive Block Controls adds practical responsive controls to supported native Gutenberg blocks. Adjust layouts, spacing, column widths, Query Loop grids, Gallery columns, and Spacer heights without replacing core blocks or moving content into a page builder. Native WordPress blocks are fast, portable, and theme-friendly, but responsive layout tweaks often still require custom CSS, duplicated blocks, or a full page builder. This plugin keeps your content in native blocks and adds the missing breakpoint controls directly in the block inspector. Why use it? Add responsive controls to supported native Gutenberg blocks. Keep existing core blocks, patterns, synced patterns, reusable blocks, and template parts. Avoid extra builder markup, shortcodes, and content lock-in. Adjust columns, gaps, custom widths, order, Media & Text layouts, Query Loop grids, Gallery layouts, and Spacer heights from the editor sidebar. Preserve desktop behavior and theme spacing defaults unless you override them. Remove the plugin without breaking the saved content structure. Supported blocks Support is added block by block. In this version, responsive controls are available for: core/columns — responsive column counts, gap controls, and custom-width mode. core/column — per-breakpoint width and order controls when custom-width mode is enabled on the parent Columns block. core/post-template inside Query Loop — manual column controls, auto-fit minimum width, responsive gaps, and optional Masonry for supported fixed-column grids. core/gallery — responsive columns and gap controls while keeping the native Gallery block. core/spacer — tablet and mobile height overrides while keeping the native desktop Spacer height. core/media-text — side-by-side or stacked layouts and stacked order across four non-desktop breakpoints. How it works The plugin stores settings as native block attributes and renders a small set of CSS classes and custom properties. It does not register replacement layout blocks and does not wrap your content in custom frontend markup. Your theme stays in control of the base layout. Responsive Block Controls only applies supported responsive values at the configured breakpoints. If the plugin is removed, WordPress ignores the extra attributes and the blocks fall back to their normal core behavior. Editor experience Responsive controls appear only when the selected block is supported. Breakpoint tabs follow desktop, tablet, and mobile editing workflows. Smaller breakpoints inherit from larger breakpoints until you override them. Gap controls support px, rem, and em values with predictable reset behavior. Custom-width Columns layouts support per-column width and simple order controls. Query Loop grids support manual columns, auto-fit minimum width, and Masonry guidance where available. Spacer height can be customized for tablet and mobile previews. Media & Text can inherit, stay side by side, or stack with media first or text first at each non-desktop breakpoint. Theme spacing defaults are detected when possible. Reset actions are scoped to the active setting and breakpoint, so inherited values and unrelated responsive settings are preserved. WordPress 7.1 responsive styles WordPress 7.1 introduces responsive values for standard block supports. Responsive Block Controls keeps those native values and its own four-breakpoint values separate: Leave Advanced 4 breakpoints disabled to let WordPress control overlapping responsive layout and gap properties. Enable Advanced 4 breakpoints when you need separate tablet landscape, tablet portrait, mobile landscape, and mobile portrait values. If both systems contain overlapping values, the editor shows a conflict warning and the plugin’s Advanced 4 breakpoints take precedence only for supported overlapping layout and gap properties. Switching back to WordPress responsive styles is reversible: plugin settings and native WordPress settings are preserved rather than migrated or deleted. Native responsive typography, padding, colors, and other non-overlapping block supports continue to work. Accessibility and localization Inspector controls are keyboard accessible and labeled for screen readers. Strings are translation-ready via the responsive-columns text domain.