Lightbox & Modal Popup WordPress Plugin – FooBox


FooBox was the first lightbox to take responsive layout seriously. Not only does it scale images to look better on phones, but it rearranges it’s button controls to look great in both portrait or landscape orientation.

Add a modal popup to your website images with no setup. FooBox will automatically add modals to WordPress galleries, WordPress images with captions, and attachment images.

Works with most image gallery plugins, but works best with our FooGallery Gallery WordPress Plugin.


Within Gutenberg, FooBox lightbox will automatically add a modal popup to images and galleries that have the “Link To” setting set to “Media File”.
Image captions set in the editor are also automatically picked up in the FooBox modal popup.

FooBox Image Lightbox Features:

  • Responsive lightbox design
  • Modern lightbox design
  • Zero configuration!
  • Works with WordPress galleries
  • Works with WordPress captioned images
  • Control when to exclude / include FooBox JS & CSS assets

Includes a 7-day free trial of FooBox Pro Lightbox!

You can try the PRO version for free for 7 days.

FooBox PRO Features:

  • Social sharing (10+ networks)
  • Video lightbox support
  • HTML lightbox support
  • iFrame support
  • Deeplinking
  • Fullscreen and slideshow modes
  • Metro lightbox style
  • Flat lightbox style
  • 5 color schemes, 12 buttons icons and 11 loader icons
  • 85+ settings to customize

FooBox PRO Works With:

Check out the full feature comparison.

Complete FooBox Asset Control

By default, FooBox lightbox includes javascript and stylesheet assets into all your pages. We do this, because we do not know if the page content contains media or not.
If you want more control over when FooBox assets are included, you can now exclude the assets by default, by enabling a setting. Then on each page, you can choose to include them when required.
Alternatively, you can leave the setting disabled, and then choose to exclude the FooBox assets from particular pages. A new metabox is now available when editing your pages or posts.
This new feature was only available in the PRO version beforehand, but we feel control over your website performance is something you should not have to pay for. Enjoy!



  • Frontend example
  • Phone example


  1. Upload foobox-free folder to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. A modal lightbox will automatically be added to your linked images and galleries


FooBox is not working. I do not see a lightbox

Make sure your images/galleries are set to Link To the Media File (within Gutenberg).
In the class editor, make sure your images/galleries are linking to the media file.
FooBox scans for images or thumbs that are pointing to the full-size version of the image. If the image is not linking to the full size image, then FooBox cannot work on that image.
You can tell if an image links to a full-size version when you can click on the image and the full size version opens in the browser.

FooBox is not working. There is an error in the console “Uncaught ReferenceError: FooBox is not defined”

Some plugins or themes defer javascript in the page, which causes the FooBox initialization code to run BEFORE the FooBox main script is loaded. This has been fixed in version 1.2.24. Please upgrade.

My theme has a built-in lightbox and it shows under FooBox. What can I do?

There is a setting to try and disable hard coded lightboxes, but this is not a sure-fire solution for every scenario. If that setting does not work for you, you might need to deregister certain javascript files, or uncomment certain lines of code in your theme to remove it’s lightbox.


فيڥري 20, 2024
it´s easy to get going right after the install! not too complex as I am needing it for “single” images to lightbox! really excellent!!!!!!
أوت 22, 2023
A great lightbox plugin, works fine with Divi. However, the ad banners soliciting a 5 star review and the Foo Bar banner are huge when using an iPad and cover half the text on the Advanced Settings page. So probably needs some more testing on mobile/responsive devices!
Read all 87 reviews

Contributors & Developers

“Lightbox & Modal Popup WordPress Plugin – FooBox” is open source software. The following people have contributed to this plugin.


“Lightbox & Modal Popup WordPress Plugin – FooBox” has been translated into 13 locales. Thank you to the translators for their contributions.

Translate “Lightbox & Modal Popup WordPress Plugin – FooBox” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Update 4 May 2024
  • Update : Freemius SDK update 2.7.2
  • Fix : enhanced sanitization for settings.


  • Updated 1 July 2023
  • Update : Freemius SDK to 2.5.10


  • Updated 10 April 2023
  • Update : Freemius SDK to 2.5.6


  • Updated 01 March 2023
  • Update : Freemius SDK to 2.5.3
  • Update : Updated to latest FooBox client JS & CSS 2.4.13


  • Updated 03 March 2022
  • Fix : Security fix in wp-admin
  • Update : Freemius SDK to 2.4.3


  • Updated 15 Jan 2022


  • Updated 5 Sep 2021


  • Updated 08/09/2021
  • Update : Freemius SDK (develop)
  • Fix : fixed conflict with PHP 8 and Russian translation (within Freemius SDK)
  • New : added “REL Grouping” setting under Advanced to be able to change the grouping of images using the rel attribute
  • New : added “Custom Excludes” setting under Advanced to add custom excludes so that FooBox does not bind to certain elements
  • New : added “Specific CSS classes” setting under General to allow specifying custom selectors that FooBox can bind to


  • Updated 27/12/2020
  • New : added compatibility with Elementor custom captions
  • New : added compatibility with WP Rocket to always exclude FooBox inline script to avoid javascript errors
  • Update : Updated to latest FooBox client JS & CSS 2.4.6


  • Updated 19/12/2020
  • Fix : fix for loader appearing after the modal is closed in come instances
  • Fix : additional jQuery 3+ compatibility – removed all deprecation warnings
  • Update : Updated to latest FooBox client JS & CSS 2.4.5


  • Updated 01/12/2020
  • Fix : fixed settings page CSS due to conflict with some themes
  • Fix : Updated deprecated jQuery warnings in prep for WP 5.6
  • Update : Updated to latest FooBox client JS & CSS 2.4.4
  • Update : Freemius SDK 2.4.1


  • Updated 20/10/2020
  • Update getting started page to include a CTA to open FooBox demo
  • Added new setting to force the FooBox trial notice admin banner to never show
  • Updated settings page with ratings CTA and included details of other plugins


  • Updated 20/08/2020
  • Fix : fixed bug where FooBox was ignoring FooGallery filters
  • Update : Updated to latest FooBox client JS & CSS 2.4.2


  • Updated 06/08/2020
  • New : Speed improvements (replaced font with SVG images)
  • New : Dropped support for IE7
  • Update : Freemius SDK
  • Update : Updated to latest FooBox client JS & CSS 2.4.0


  • Update : Freemius SDK 2.3.2
  • Update : Updated to latest FooBox client JS & CSS


  • Fix : turned off font preload by default
  • Fix : scrollbar bug in iOS13
  • Update : Updated to latest FooBox client JS & CSS


  • Fix : Slideshow was stopping after the Lightbox is closed
  • Update : Updated to latest FooBox client JS & CSS


  • Update : Updated to latest FooBox client JS & CSS


  • Fix : Fixed admin bug with certain galleries
  • Update : Updated to latest FooBox client JS & CSS


  • Fix : Fixed get_blog_list error
  • Update : Freemius SDK 2.3.0


  • Fix : Fixed swipe issues in Chrome
  • Update : Updated to latest FooBox client JS & CSS


  • New : Reworked how FooBox loads, to work better with optimization plugins (Autoptimize / WP Rocket)
  • Remove : Removed support for Google+ in social sharing
  • Update : Updated to handle Chrome’s new allow attribute in videos
  • Update : Updated to latest FooBox client JS & CSS


  • New : Added support for SVG images
  • New : Added support for WebP images
  • Fix : Fixed scroll blocking violation warnings in dev tools
  • Update : Updated to latest FooBox client JS & CSS


  • IMPORTANT : Please update to address a security vulnerability.
  • Fix : Security vulnerability
  • Fix : Included font-display for improved pagespeed score
  • Update : Freemius SDK 2.2.4


  • Added support for loading FooGallery galleries within a FooBox
  • Fixed layout bugs with certain notched iPhones
  • Updated to latest client JS & CSS fixing a few bugs
  • Updated to latest Freemius SDK 2.2.3


  • Added support for the Gutenberg gallery and image blocks
  • Updated to latest Freemius SDK 2.1.1
  • Fixed bug with horizontal scrollbar
  • Fixed bug with paging + filtering in FooGallery
  • Forced Youtube videos to open using
  • Updated to latest client JS & CSS fixing a few bugs


  • Updated to latest Freemius SDK 2.0.1


  • Updated to latest client JS & CSS fixing a few bugs
  • Removed deprecated functions for PHP 7.2 compatibility
  • Updated to latest Freemius SDK 1.2.4


  • Dropped support for IE7 and IE8 (removing CSS validation errors)
  • Updated to latest client JS & CSS fixing a few bugs


  • Added new setting to exclude FooBox assets by default
  • Added metabox on all public post types to include/exclude FooBox assets
  • Major version bump to avoid confusion with FooBox PRO


  • Fix : lightbox was not working with FooGallery paging
  • Updated to latest client CSS
  • Updated to latest Freemius SDK
  • Removed FooGallery admin notices


  • Fix : default caption state was disabled when no settings were saved.
  • Updated to latest Freemius SDK


  • Fix : disappearing captions. Renamed “Show Captions” setting to “Hide Captions” and default to disabled.


  • Added setting to disable captions
  • Added setting to change image counter text


  • Added better browser support for defer javascript loading added in 1.2.23


  • Added support for plugins that defer javascript loading, e.g. AutOptimize


  • Updated to latest JS and CSS fixing multiple issues and bugs


  • Updated to latest JS and CSS fixing some bugs
  • Updated to latest Freemius SDK
  • Free trial for PRO now included in getting started page


  • Fix deactivation issue when PRO is activated


  • New setting for dropping IE7 support (for valid CSS)
  • Fix for when multiple jQuery versions loaded on page!
  • Fix for not including scripts for setting ‘disable other lightboxes’


  • IMPORTANT : clear your site cache when updating – if you use a caching plugin.
  • Added clear cache message to getting started page
  • Removed duplicate settings page
  • Updated opt-in message
  • Fix : loosing scroll position when scrollbars are hidden


  • Integrated Freemius tracking and upgrade system
  • Moved FooBox into top-level menu item
  • Complete overhaul of Getting Started page, including demo
  • Updated to use latest FooBox JS and CSS


  • Hide foo admin notice on mobile devices
  • More CSS tweaks for admin on smaller screen sizes


  • Updated settings page to be responsive
  • Tested with WP 4.6


  • Updated to use latest FooBox JS and CSS
  • Removed discount for FooBox PRO


  • Updated to use latest FooBox JS and CSS
  • Updated settings to include demo tab
  • Updated admin screens be responsive on phones


  • Updated to use latest FooBox JS fixing few bugs
  • Smarter admin warnings when using with FooGallery


  • Updated to use latest FooBox JS fixing few bugs
  • Reorder selectors so FooGallery can take preference in some cases


  • Updated to use latest FooBox JS
  • Added new Getting Started landing page on activation
  • Added support for language packs
  • Better FooGallery integration


  • Updated to latest version of javascript and CSS files
  • Plays better with FooBox PRO now


  • Fixed navbar issues in Chrome on IOS


  • Fixed very minor vulnerability with add_query_arg function used in admin plugins page


  • Improved FooGallery support
  • Added keyboard navigation support!
  • 50% offer included for PRO version


  • Added FooGallery support
  • Added .nolightbox to exclusions
  • Added .pot translation file
  • Added Bottomless design banner to “FooBot Says…” tab

  • Fixed jQuery dependency issue with themes that do not load jQuery by default


  • Added setting “Show Captions On Hover”
  • Added “FooBot Says…” tab on settings page


  • first version!