Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

slimbox2

31 sites Security covered
View on drupal.org

The Drupal Slimbox2 module is a wrapper that integrates the lightweight Slimbox2 jQuery plugin with a Drupal site seamlessly and automatically. Once installed and activated, you can add lightbox effects to hyperlinks by adding a rel="lightbox" or rel="lightbox-series" attribute to your link.

NOTE FOR DRUPAL 8 | 9 | 10 users with the latest version of Slimbox2:
The latest code recommends using Composer to manage the Slimbox 2.05 library which is slightly different than the earlier version in that it uses an autoload script. If you are upgrading from the 8.x version to the 2.x version make sure that you use composer to manage the Slimbox library according to the README.md file.

Why another lightbox plugin?
Good question. With the availability of Colorbox, Lightbox2 and Fancybox, why would there be interest in another image lightbox utility?

The answer is simplicity... I wanted a simple plugin that I could install and just start using. I don't need multiple styles of lightboxes, I just want a module with a tiny code footprint that will let me easily create links to images with a lightbox effect. As a bonus, the Slimbox2 jQuery plugin is also a very small piece of code when compared with the other plugins. It's about 4k which is less than half the size of the others, so it's a win-win.

About the Slimbox2 jQuery plugin (from the Slimbox2 web page)
Slimbox2 is a 4 KB visual clone of the popular Lightbox2 script by Lokesh Dhakar, written using the jQuery javascript library. It was designed to be very small, efficient, standards-friendly, fully customizable, more convenient and 100% compatible with the original Lightbox2.

More information about the Slimbox2 plugin can be found here: http://www.digitalia.be/software/slimbox2

Dependencies:

Note: The D8 branch (under development) does not require the Libraries API module.

Installation Drush (Recommended):

  1. Install the Libraries API module: drush en libraries -y
  2. Install this Slimbox2 module: drush en slimbox2 -y
  3. Upload the Slimbox2 plugin to /site/all/libraries: drush slimbox2-plugin

Installation Manually:

  1. Get the Slimbox 2 plugin from

    https://github.com/cbeyls/slimbox/releases/tag/2.05
  2. unpack the Slimbox 2 plugin and rename to slimbox2
  3. Upload the slimbox2 plugin to your Drupal site's libraries folder.

    Usually found at: /sites/all/libraries/

    Full path with slimbox2: /sites/all/libraries/slimbox2
  4. Install the Libraries API module

    https://drupal.org/project/libraries
  5. Install this Slimbox2 module

    https://drupal.org/project/slimbox2
  6. Activate Libraries and Slimbox2

D8
Use the stable Drupal 8 branch.

As mentioned above you'll need to add the Slimbox2 jQuery library. You can get it HERE. Rename it to slimbox2 and place it in the root Libraries folder. The resulting path will look like this: /libraries/slimbox2

Read the README.txt file for more details.

Usage
Create a hyperlink to the image that you want to see in a lightbox and add a rel="lightbox" attribute to your link. For example once the slimbox2 module is installed, if you have an image at /sites/default/files/images/big-image.jpg, you could link to it with a "lightbox" effect with the following HTML markup.

<a href="/sites/default/files/images/big-image.jpg" rel="lightbox">lightbox link</a>

For lightbox series adjust the links as follows: (rel="lightbox-series")

<a href="/sites/default/files/images/big-image1.jpg" rel="lightbox-series">lightbox link</a>
<a href="/sites/default/files/images/big-image2.jpg" rel="lightbox-series">lightbox link</a>
<a href="/sites/default/files/images/big-image3.jpg" rel="lightbox-series">lightbox link</a>
<a href="/sites/default/files/images/big-image4.jpg" rel="lightbox-series">lightbox link</a>

<!-- The rel="lightbox-series" could be anything as long as it prefixed with "lightbox-"  -->

* See the README.txt file for more information.

Disclaimer
I don't know the author of the Slimbox2 jQuery plugin and have only developed this module because I have found it simple to use. I hope others find this module useful and easy to use.

Note: The Slimbox2 module is an efficient, lightweight solution to adding lightbox links, lightbox image series and lightbox galleries to a Drupal site but where it shines in simplicity, it is limited to a single lightbox style and only applies the lightbox effect to images at this time. For a more feature oriented module, with options to applying lightbox effects to nodes and other media, I would suggest looking at the Colorbox module and its related modules.

Activity

Total releases
1
First release
Oct 2025
Latest release
6 months ago
Release cadence
Stability
100% stable

Releases

Version Type Release date
2.0.2 Stable Oct 7, 2025