Gallery Block Lightbox


This WordPress Plugin adds a simple & lightweight Lightbox to the standard WordPress Image Gallery Block. It detects if a post contains a Gallery Block and then loads & initializea 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 Block. You can deactivate this plugin at any time and your Gallery Blocks will work as they’ve done before. Just without the lightbox.

Just one important thing to remember: You always have to select Link to → Media File for all of your Galleries to work properly. If you choose None or Attachment Page it will not work.

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


  • Simple, modern and minimalistic Lightbox for your Gallery Block
  • Set Link to to Media File on your Gallery Block


  1. Upload the folder gallery-block-lightbox to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Add a Gallery Block to your Post and set Link toMedia File
  4. Check your Gallery with Lightbox on the front end by clicking on an image


When I click on an image, nothing happens

Check if you used the built in Gallery Block and if Link to is set to Media File in the Block sidebar.

Does it work for singe images?

No, it only works with the standard Gallery Block.

Can I deactivate the Lightbox for a Gallery?

Set Media File to None.


Read all 1 review

Contributors & Developers

“Gallery Block Lightbox” is open source software. The following people have contributed to this plugin.




First release