Lightbox for Gallery & Image Block
by Johannes Kinast 5 (88 reviews)

Lightbox for Gallery & Image Block

Adds a simple & lightweight Lightbox to the standard WordPress Gallery & Image Block. No lock in and no dependencies.

Lightbox for Gallery & Image Block ranks #1,308 among WordPress.org plugins with 20,000+ active installations, is #139 of 6,299 in the Media category, a 5/5 rating from 88 reviews, and was last updated May 28, 2026. Data from WordPress.org, refreshed twice daily — see methodology.

Tested up to WP 7 (Current: 7.1)
vtrunk Current Version vtrunk
Updated 3 months ago Last Update on 28 May, 2026
Refreshed 8 hours ago Last Refreshed on
#139 of 6,299 in Media Top 5% by installs Downloads -21.1% this week
View on WordPress.org
Rank
#1,308
+2 this week
Active Installs
20K+
-15.8%
KW Avg Position
17.2
0.6 better
Downloads
189.1K
+60 today
Support Resolved
100%
No change
Rating
100%
Review 5 out of 5
5 (88 reviews)

Next Milestone 30K

Total Progress 40%
20K+ 30K+
216
Ranks to Climb
-
Growth Needed
8,000,000
Active Installs
Pro

Unlock Exact Install Count

See the precise estimated active installs for this plugin, calculated from real-time ranking data.

  • Exact install estimates within tiers
  • Track install growth over time
  • Milestone progress predictions
Upgrade to Pro
Need 6,000 more installs to reach 30K+

Rank Changes

1,243 1,276 1,309 1,342 1,375 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026
1,243 1,276 1,310 1,344 1,377 31-08-2026 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026
Current #1,308
Change
Best #

Upgrade to Pro

Unlock 30-day and 90-day rank history charts with a Pro subscription.

Upgrade Now

Active Installs Growth

Active Installs 0,000,000+
Growth +0.0%
Peak 0,000,000

Downloads Growth

30 40 50 60 70 80 90 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026
0 100 200 31-08-2026 01-09-2026 02-09-2026 03-09-2026 04-09-2026 05-09-2026 06-09-2026 07-09-2026 08-09-2026 09-09-2026 10-09-2026 11-09-2026 12-09-2026 13-09-2026 14-09-2026 15-09-2026
Downloads
Growth
Peak

Upgrade to Pro

Unlock 30-day, 90-day, and yearly download history charts with a Pro subscription.

Upgrade Now

Reviews & Ratings

5.0
88 reviews
Overall 100%
5
87 (99%)
4
1 (1%)
3
0 (0%)
2
0 (0%)
1
0 (0%)

Support Threads Overview

Resolved
Unresolved
1
Total Threads
1
Resolved
0
Unresolved
100%
Resolution Rate

Security History

Source: WPVulnerability

No known vulnerabilities on record for Lightbox for Gallery & Image Block. Checked 1 week ago.

TL;DR

AI summary of the plugin's readme

This plugin is for WordPress site owners using the standard Gallery or Image Block who want a lightbox effect without extra dependencies. It solves the problem of viewing images in a proper lightbox by detecting Gallery/Image Blocks and loading baguetteBox.js automatically.

  • No dependencies (e.g. jQuery)
  • Image captions support
  • Responsive design
  • Supports swipe gestures
  • Works with Gallery Block
  • Works with Image Block
  • Works with Media and Text Block
  • Works with CoBlocks Gallery

Frequently Asked Questions

Common questions about Lightbox for Gallery & Image Block

Check if you used the built in Gallery Block and if Link to is set to Media File in the Block sidebar. On an Image Block choose Add Link at the Toolbar.
Yes! Just set the Link at the Toolbar to Media File
Set Media File to None or remove the Link.
Since WordPress 5.6 you can now set the default behavior for Link to. Go to yourblog.com/wp-admin/options.php and search for image_default_link_type. Set the value to file and hit save. This will apply to all new Image & Gallery Blocks. Or you can add the follow snipped (WordPress 5.7+ / PHP 7.4+) to your functions.php: add_filter( 'option_image_default_link_type', fn () => 'file' );
You can change the CSS selector to a gallery (or galleries) containing <a> tags used by baguetteBox.js with the baguettebox_selector filter: add_filter( 'baguettebox_selector', function( $selector ) { return $selector . ',.my-gallery'; } ) You can override the full selector by just returing your selector e.g. to show all images in your post in one lightbox (not per Gallery/Image Block): add_filter( 'baguettebox_selector', function() { return '.entry-content'; } )
If you use a Gallery or Image Block outside a post e.g. inside a Widget and want to apply the Lightbox, you need to ensure that the required baguettebox assets (script & style) are queued using the baguettebox_enqueue_assets filter. If the Widget is on every page or the majority of pages, you can just enqueue the baguettebox assets everywhere. Just add the following snippet to functions.php: add_filter( 'baguettebox_enqueue_assets', '__return_true' ); If your Widget is just at the front page, use is_front_page(): add_filter( 'baguettebox_enqueue_assets', function( $enqueue_assets ) { return is_front_page(); } ); If you want to use the Gallery & Image Block Lightbox plugin with a block type that is not supported by default, you can make use of the has_block() function. For instance, in the case of the Kadence Blocks Advanced Gallery, use: add_filter( 'baguettebox_enqueue_assets', function ( $enqueue_assets ) { return $enqueue_assets || has_block( 'kadence/advancedgallery' ); } ); Of course, in the previous example you also have to add the appropriate baguettebox selector, i.e. add_filter( 'baguettebox_selector', function( $selector ) { return $selector . ',.wp-block-kadence-advancedgallery'; } );
By default, baguetteBox.js shows a slide-in animation on image transitions. You can change it to the following filter to 'fadeIn': add_filter( 'baguettebox_animation', function () { return 'fadeIn'; } ); Or disable the animation completely with 'false': add_filter( 'baguettebox_animation', function () { return 'false'; } );
You can remove the link from the image or add the CSS class no-lightbox to the image link. Not to the image directly; you have to add the class to the link.

Sign In / Register

You need to sign in or register to use this feature.