Enables the previous "classic" editor and the old-style Edit Post screen with TinyMCE, Meta Boxes, etc. Supports all…
About Lightbox for Gallery & Image Block
This WordPress plugin adds a lightweight lightbox to the standard WordPress Gallery & Image Block. It does not add a new Block Editor/Gutenberg Block and can be easily deactivated without affecting your Gallery and Image Blocks. Just remember to select "Link to image file" or "Link images to media file" for your Image & Gallery Blocks to work properly.Screenshots



Frequently asked questions
What is this plugin's purpose?
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.
Does this plugin have any dependencies?
No, this plugin uses baguetteBox.js, which is a pure JavaScript Lightbox script without any dependencies. It does not rely on libraries like jQuery.
Will my content be affected if I deactivate the plugin?
No, there is no lock-in effect. You can deactivate this plugin at any time, and your Gallery and Image Blocks will continue to work as before, just without the lightbox functionality.
What is required for the lightbox to work with images and galleries?
You must select "Link → Link to image file" or "Link images to media file" for all your Image & Gallery Blocks. If you choose "None" or "Link to attachment page," the lightbox will not work for those specific items.
What types of blocks and galleries are supported?
It works with the Gallery Block, Image Block, Media and Text Block, Classic Editor Gallery, CoBlocks Gallery types, Meow Gallery (+ Gallery Block), and GenerateBlocks Image (with Enable Dynamic Data → Link source to Single image set).
Changelog
1.15
- Add filter baguettebox_captions to change the JavaScript function to get the caption of an image
1.14
- Add the CSS class
.no-lightboxto an element to disable the lightbox
1.13
- Support GenerateBlocks Image
1.12
- Support Meow Gallery (+ Gallery Block)
1.11
- Add filter baguettebox_enqueue_assets to control enqueing of baguettebox assets.
1.10.1
- Fix Image in Media & Text Block
1.10.0
- Add two Filter baguettebox_selector for the baguetteBox.js CSS selector and baguettebox_filter for the baguetteBox.js file type RegExp filter
1.9.0
- Support new Gallery Block format (will be released with WordPress 5.9 in December 2021) https://make.wordpress.org/core/2021/08/20/gallery-block-refactor-dev-note/
1.8.5
- Fix Caption for the single Image Block
1.8.4
- Add Caption Support for the Classic Editor Gallery
1.8.3
- Fix Regex Filter
1.8.2
- Add support for file links with query parameter at the end
1.8.1
- Fix image link filter
1.8.0
- Add support for .avif, .heif/.heic, .tif
1.7.0
- Add support for Media and Text Block
1.6.0
- Add support for CoBlocks Gallery Collage / Masonry / Offset / Stacked
1.5.0
- Add support for Classic Editor Gallery
1.4.0
- Add support for .svg images
1.3.1
- Remove trailing slash from register_script/style
1.3.0
- Support for the default Image Block
1.2.0
- Support HTML for the Caption
1.0.0
First release