Comparison of Lightbox-type modules

Last modified: August 20, 2009 - 16:07

There are many "box" scripts freely available on the net. To get an initial idea of which box is suitable for you, http://planetozh.com/projects/lightbox-clones might help you to pick some candidates.

There are various modules in Drupal which provide "lightbox" type functionality. These modules usually use JavaScript to overlay images on the current page when clicked upon, which has the advantage of being able to show users the large version of a thumbnail image while keeping them on the same page. However, there are a number of these modules available, each quite similar but some have more features, while others are more lightweight or have better browser support.

This article attempts to do a comparison between these modules to allow you to choose which one best suits your needs. For the purposes of this comparison, the "lightbox" type functionality where content can be displayed in a container overlayed on the current page, whether it be for images, iframed content or videos, shall be referred to as a "lightbox".

If any of the information is incorrect or out of date, please let me know and I will do my best to update or correct it.

I should point out that I'm the current maintainer of the Lightbox2 module but I'm aiming to produce an unbiased and fair comparison below.

Available Modules

There are quite a few modules that provide lightbox functionality. Below is a list of the ones I found and shall compare, but there may be others that I've missed.

  • Lightbox2 - supports images, grouped images, slideshow images, videos and HTML content. It also supports a wide number of Drupal's various image modules. Older versions (4.7.x and 5.x-1.x) used the prototype and script.acolu.ous libraries, but has since been re-written to take advantage of the jQuery library now included in Drupal core.
  • jQuery Lightbox - a port of the Lightbox2 project which uses jQuery. It was released a few days before Lightbox2's own jQuery version. It has fewer features and configuration options, which may be advantageous to some users.
  • Thickbox - a wrapper for the jQuery "thickbox" plugin and includes image and iframed content support. It also provides integration support for Drupal's image, imagecache and imagefield modules.
  • Shadowbox - a nice module which works well and will be a very powerful tool with the addition of integration with more Drupal media modules. The only disadvantage is that it depends on 3rd party software.
  • Greybox Redux - this module shows HTML content (websites) in a lightbox, but doesn't have any support for image content.

I won't be including the following modules in my comparison:

  • DBFM Greybox - this module does nothing on it's own, but is required by the Database File Manager (DBFM) module to display pop-up windows. I'm not including this in the comparsion as it's specifically only for the DBFM module.
  • Slidebox - this module allows you to select a View which "slides in" from the top of the browser window on specified pages. It doesn't provide "true" lightbox functionality which I would consider to be where the user clicks on something and a lightbox is opened. This lightbox is triggered on page load and is specifically for showing Views in a lightbox. Therefore, I'm not going to include it in my comparison. However, for those who are interested, I've included it in the browser support section below.
  • Slideshow - this isn't actually a lightbox module. From reading the project page I was a bit unsure because it says that it can show the slideshow above the page content, but by this it means at the top of the page, rather than in a lightbox overlay. I've included it in some of the overview tables below for those who are interested.

Overview

Module Overview

Module Versions Documentation Demo Site Last Update
4.7.x 5.x 6.x
Lightbox2 Yes Yes Yes Handbook pages
README.txt
http://www.stellapower.net/lightbox2 2008-Jun-29
jQuery Lightbox No Yes Yes README.txt 2008-Feb-24
Thickbox dev Yes Yes README.txt http://jquery.com/demo/thickbox/ 2008-Sept-12
Shadowbox No Yes Yes README.txt http://mjijackson.com/shadowbox/ 2008-Jul-29
Greybox Redux No Yes Yes README.txt http://jquery.com/demo/grey/ 2007-Jul-15
DBFM Greybox No Yes No 2008-Apr-03
Slidebox No dev No 2007-Dec-17
Slideshow Yes Yes No README.txt 2006-Dec-25

Feature Overview

For reference, "grouped images" means that you can group images together and manually navigate between them using "next" and "previous" buttons. A "slideshow" means it's possible to group images together and have the browser automatically traverse through them without clicking any buttons, usually accompanied by a play/pause feature. "Video" support means either that they can display flash content in the lightbox or video in a player within the lightbox.

Module Images Grouped Images Image Slideshow HTML Content Inline Content Videos Multilingual Support
Lightbox2 Yes Yes Yes Yes Yes Yes Yes
jQuery Lightbox Yes Yes No No No No No
Thickbox Yes Yes No Yes1 Yes No2 Yes
Shadowbox Yes Yes Yes Yes Yes Yes Yes3
Greybox Redux Yes No No Yes No No No

Notes:

  1. Thickbox: the documentation says it supports HTML content via the use of iframes. While I managed to get this to work with some sites, it didn't work with others including google.com. I believe this is because of the addition of GET parameters to the url.
  2. Thickbox: in theory it should be possible to view videos in a thickbox, but it's not enough to just provide it with a link to a video. It works quite nicely with Embedded Media Field videos though where the emfield module creates the embed object and inserts it into thickbox's iframe.
  3. Shadowbox: multilingual support is available in the 5.x-1.0 version. 5.x-2.0 moves language support from the module to Shadowbox itself and proper options will be added to allow translation in the near future. Multi-lingual support will be added to the 6.x-1.x-dev version when it has a full release.

Integration with other Drupal Modules

Module Lightbox2 jQuery Lightbox Thickbox Shadowbox Greybox Redux
Image Yes Yes Yes No No
Imagecache Yes Yes1 Yes Yes No
Imagefield Yes Yes Yes Yes No
Image Assist Yes Yes Yes No No
Embedded Media Field (images) Yes No No No No
Embedded Media Field (videos) Yes No Yes No No
Inline Yes Yes Yes No No
Gallery 2 Yes No No No No
Flickr Yes No No No No
Acidfree Albums (images) Yes No No No No
Acidfree Albums (videos) Yes No No No No
Brilliant Gallery Yes No Yes No No
FileField Yes No No Yes No

Browser Support

Some of this information was taken from the module's documentation, others I had to test in order to determine which browsers were supported. Just because a browser is listed below doesn't mean that the browser is actively supported, but that the results of my tests show that current latest version (listed above) of the module behaves without any problems.

Note: Netscape 9.x is listed below, but AOL official support for this browser ended on 1st March 2008.

Windows
Browser Lightbox2 jQuery Lightbox Thickbox Shadowbox Greybox Redux Slidebox
Firefox (ver 2.x, 3.x) Yes Yes Yes Yes Yes Yes
IE 7 Yes Yes Yes Yes Yes Yes
IE 6 Yes Yes Yes Yes Yes2 Yes
IE (earlier) Yes1 Yes No No Yes No
Opera (ver 9.2x, 9.5x) Yes Yes Yes Yes Yes No
Safari (ver 3.x) Yes Yes Yes Yes Yes No
Flock (ver 1.2) Yes Yes Yes Yes Yes No
Seamonkey (ver 1.1.9) Yes Yes Yes Yes Yes No
K-Meleon (ver 1.1.5) Yes Yes Yes Yes Yes No
Avant (ver 11.6 bd 13) Yes Yes Yes Yes Yes No
Netscape (ver 9.x) Yes Yes Yes Yes Yes No

Notes:

  1. Lightbox2: IE 5.5 and earlier are only supported in Drupal 5.x. This is because the version of jQuery in Drupal 6.x no longer supports these browsers.
  2. Greybox Redux: Clicking the overlay in IE 6 doesn't close the lightbox as expected.
Mac OS
Browser Lightbox2 jQuery Lightbox Thickbox Shadowbox Greybox Redux Slidebox
Firefox (ver 2.x, 3.x) Yes Yes Yes Yes Yes Yes
Safari (ver 2.x, 3.0) Yes Yes Yes Yes Yes No
Camino (ver 1.6) Yes ? ? Yes ? ?
Flock (ver 1.2) Yes Yes Yes Yes Yes No
Linux / BSD
Browser Lightbox2 jQuery Lightbox Thickbox Shadowbox Greybox Redux Slidebox
Firefox (ver 2.x, 3.x) Yes Yes Yes Yes Yes Yes
Opera (ver 9.2x, 9.5x) Yes Yes Yes Yes Yes No
Flock (ver 1.2) Yes Yes Yes Yes Yes No
Seamonkey (ver 1.1.9) Yes Yes Yes Yes Yes No
Epiphany (ver 2.22.1.1) Yes Yes Yes Yes Yes No
Kazehakase (ver 0.5.2) Yes Yes Yes Yes Yes No
Midori (ver 0.0.17) Yes Yes Yes Yes Yes No
Galeon (ver 2.0.4) Yes Yes Yes Yes Yes No
Konqueror (ver 3.5.9) Yes Yes Yes Yes Yes No
Netscape (ver 9.x) Yes Yes Yes Yes Yes No

Notes:

  1. Konqueror currently no longer supports their proprietary -khtml-opacity setting, but still hasn't added support for the CSS3 opacity property. This will hopefully be added in KDE4.

Coding Standards

The following information shows how standards compliant these modules are.

Module Drupal Standards CSS 2 / 2.1 CSS 3
Lightbox2 Yes No1 No1
jQuery Lightbox Yes Yes Yes
Thickbox Yes No2 No2
Shadowbox Yes Yes Yes
Greybox Redux No No2 No2
Slidebox No No Yes
Slideshow No Yes Yes

Notes:

  1. Lightbox2 fails the CSS standards test as it provides backwards compatibility for browsers which do not support the opacity CSS3 property. Older versions of Mozilla and Opera browsers require -moz-opacity, older Safari and Konqueror browsers require -khtml-opacity, while older IE browsers require filter.
  2. Thickbox and Greybox partially fail the CSS standards test because of the same opacity property support discussed in the previous point.

File Size

Module Javascript (kB) CSS (kB)
Lightbox2 36 (basic)
44.8 (auto image handling enabled)
43.2 (video enabled)
52 (all enabled)
12 (lite)
4.3 (default layout)
3.4 (alternative layout)
1.2 (lite)
jQuery Lightbox 5.77 1.8
Thickbox 12.7 3.6
Shadowbox 32.3 (all enabled) 0.9
Greybox Redux 1.3 0.93

Detailed Analysis

Lightbox2

Benefits over other modules:

  • Choice of two layouts, in addition to a lightweight version with a reduced set of features.
  • Inclusion of keyboard shortcuts for navigating through images, closing the lightbox, pausing the slideshow, etc.
  • Resizes images to fit within the browser window (if enabled) but also provides a zoom-in feature to see the original size.
  • Ability to group HTML content (iframes), not just images.
  • Slideshow support.
  • Inline / modal content support.
  • Control over which image size should be displayed in the lightbox.
  • Page exclusion capability so you can prevent the lightbox functionality from working on certain pages of your site.
  • Skin and animation configuration so you can adjust the order and speed of the lightbox animations, along with the lightbox colors, border size and overlay opacity.
  • Neat feature where you can have the Drupal login form appear in a lightbox by clicking upon a link.
  • Right-to-left language support.
  • Highly configurable, perhaps too much so.
  • Good documentation and demo site.
  • Running it through the Coder module produces no errors or warnings. Adhering to the Drupal coding standards doesn't mean that the code works but is usually a sign of a well maintained module.

Disadvantages or areas in need of improvement:

  • The configuration pages are possibly just too complicated for the average user and might be off-putting. However documentation is provided and the default settings should work for the majority of users' needs.
  • Doesn't adhere to CSS standards, though this is because it provides backward compatibility for older browsers which don't support the CSS3 opacity property.

jQuery Lightbox

Benefits over other modules:

  • A lightweight version of the Lightbox2 module.
  • Adherence to CSS standards.
  • Inclusion of keyboard shortcuts for navigating through images, closing the lightbox, pausing the slideshow, etc.
  • Running it through the Coder module produces no errors or warnings. Adhering to the Drupal coding standards doesn't mean that the code works but is usually a sign of a well maintained module.

Disadvantages or areas in need of improvement:

  • No configuration page whatsoever - though this may be favoured by some users.
  • No "loading" image.
  • Poor documentation and no help information was provided with the module via a call to hook_help().

Thickbox

Benefits over the other modules:

  • Inclusion of keyboard shortcuts for navigating through images and closing the lightbox.
  • Resizes images to fit within the browser window.
  • Inline / modal content support.
  • Very neat feature where you can have the Drupal login form appear in a lightbox by clicking upon a link.
  • Control over which image size should be displayed in the lightbox.
  • Page exclusion capability so you can prevent the lightbox functionality from working on certain pages of your site.
  • Running it through the Coder module only produces 1 minor warning about a missing @file block in the install file. Adhering to the Drupal coding standards doesn't mean that the code works but is usually a sign of a well maintained module.
  • Good documentation available on the jquery site, but not available on drupal.org

Disadvantages or areas in need of improvement:

  • The documentation says it supports HTML content via the use of iframes. While I managed to get this to work with some sites, it didn't work with others including google.com. I believe this is because of the addition of GET parameters to the url. The url which failed for me was "http://www.google.com/?KeepThis=true&TB_iframe=true&height=400&width=600".
  • No ability to view the original larger version for images that were resized to fit within the browser window.
  • When viewing narrow images, the caption, image count and navigation links are quite squished which makes it difficult to click on the navigation links, if not impossible. The close link also overlaps the image count.
  • Doesn't adhere to CSS standards, though this is partially because it provides backward compatibility for older browsers which don't support the CSS3 opacity property.
  • The documentation on drupal.org is ok at best. The only documentation I found was on the jquery site. The "read documentation" link on the project page just points to the readme file, perhaps it should be changed to point at the docs on the jquery site. However I would prefer a page added to the Drupal handbook. There's no documentation on the configuration options and no help information was provided with the module via a call to hook_help().

Shadowbox

Overall it's a nice module which looks good and works quite well.

Benefits over the other modules:

  • Adherence to CSS standards.
  • Resize and drag features for images which are too large to fit in the browser window.
  • Skins allow changes to the style and structure of the interface.
  • Inclusion of keyboard shortcuts for navigating through media items, closing the lightbox, pausing the slideshow, etc.
  • Many media extensions supported.
  • Has a nice "continuous galleries" feature which allows the user to navigate from the last image in a gallery back to the first.
  • Multiple types of media items can be grouped into a gallery.
  • Slideshow support.
  • Support for image maps using the area tag.
  • Inline / modal content support.
  • Highly configurable including animation, overlay, gallery, movies, input control and media handling options.
  • Options for controlling which media types to open in the lightbox.
  • Ability to open a few media types in the JW FLV Player rather than default.
  • Smart plugin detection mechanism displays a helpful link to download the required software.
  • Page exclusion capability so you can prevent the lightbox functionality from working on certain pages of your site.
  • Running it through the Coder module produces no warnings or errors. Adhering to the Drupal coding standards doesn't mean that the code works but is usually a sign of a well maintained module.

There's a couple of areas however, that I would see as disadvantages or areas for improvement - most of these can be overcome and indeed one of them is listed in the "Future Plans" section of the project page.

  • The user guide documentation could be improved. The addition of a Drupal handbook page for the module would be good.
  • Add integration with more of Drupal's various image modules.
  • The dependency on 3rd party software is a drawback in my mind. For example, if there's a bug in the 3rd party software, the shadowbox maintainer can't really do much about it but wait for it to be fixed and re-released before Drupal users can benefit. However, nothing can be done about this and assuming the 3rd party software is reliable and has active development, I don't see it as a major stumbling block.

Greybox Redux

Benefits over other modules:

  • A lightweight lightbox module, with not too many features to confuse users.

Disadvantages or areas in need of improvement:

  • No keyboard shortcut for closing the lightbox that I could find.
  • No grouping of lightbox content.
  • I found it a bit "jerky" and if you scroll down a page and then click on a link, you have to scroll back up to see the greybox. The overlay also doesn't cover the entire page, just the first part visible in the browser window.
  • There is no automatic resizing of the lightbox for different size images.
  • The documentation is very poor. It's not clear what type of content is supported or which browsers. No help information was provided with the module via a call to hook_help().
  • Doesn't adhere to CSS standards, though this is partially because it provides backward compatibility for older browsers which don't support the CSS3 opacity property.
  • Running it through the Coder module produces 11 minor warnings, which isn't bad but could easily be fixed. Adhering to the Drupal coding standards doesn't mean that the code works but is usually a sign of a well maintained module.

Thank you for taking the time

venkat-rk - May 8, 2009 - 09:27

Thank you for taking the time and effort to put together such a thorough comparison. Much appreciated.

really helpful, thank you :)

impete82 - May 10, 2009 - 01:07

really helpful, thank you :)

lightbox2: too much animation can be a turn-off

donquixote - May 14, 2009 - 22:25

Thanks for the comparison!

I tried the lightbox2 module, but for my taste there is too much animation going on when going from one image to the next.

Most annoying is the "Caption slide down" effect (have a look at the setup page in admin/settings/lightbox2 > Advanced settings > Animation settings). It is like, the water faucet would play a melody each time before you can get any water, and then, when the melody is finished, it takes a short break, then one final chord, and then you get the water.

Even with an effect duration set to 0.01 (exactly 0 is not possible, unfortunately), it still makes a nasty flicker going from one picture to the next.

Other tools (where I have tried the demo pages) are not much better - you get a lot of unnecessary waiting for animation effects.

Highslide performs a bit better in the transition from one image to the next, but still there is waiting involved.

Not to mention the modalness, which can be a pain - but that is a different discussion..

Why not post a request in the

venkat-rk - May 16, 2009 - 04:41

Why not post a request in the module's issue queue for more fine-grained animation controls? I am sure the developer will give it due consideration.

I compared Lightbox2 and

libre fan - June 10, 2009 - 13:32

I compared Lightbox2 and Thickbox on one image in the image Gallery (using the Image module), and as I'm no programmer I'd like to know if the difference in the time it takes to actually display the image (resize or no resize) is due to Lightbox2 being a heavier module than Thickbox or to the code. Thickbox displays the image much quicker.

I'm quite aware Thickbox doesn't have so many features as Lightbox2, but still I think if an image loads fast on a website with a decent DSL connection, it is an asset at leas from the visitor's point of view.

What do you think?

In the meantime, many thanks to Stella and the other maintainers for this excellent module.

Not long after this I

libre fan - July 3, 2009 - 11:18

Not long after this I switched to Lightbox2 as it has more features, and Firefox 3.5 is so fast

helpfull!

nsolop - July 2, 2009 - 18:29

very nice article. I'm testing some modules for a new site that will require thickbox for handling images. Which module did you use to make this article/comparison?.

Thanks!

Highslide JS

TravisCarden - August 7, 2009 - 17:23

Also available is the Highslide module, integrating Highslide JS.

Shadowbox external library is non-free

corporatebastard - September 12, 2009 - 11:21

The Shadowbox module relying on an external library would be no problem for me if the external library was covered by the same or similar licence to the module, but the fact that the external library is non-free and only gratis for non-commercial uses is a major blocker. For commercial purposes you need to purchase a commercial licence, seems worth pointing this out as for many people it takes that module completely out of consideration, even though it is very pretty!

Highslide as well...

mikeker - September 15, 2009 - 22:14

FWIW, Highslide has a similar, not-free clause in their licensing agreement, which is basically a CC non-commercial license. It's free for non-profits and personal use, $29/site for commercial sites, $179 for unlimited use on commercial sites.

The details of the unlimited use clause say, "it can also be used for software products that don't compete to Highslide directly." Does this mean that someone could "donate" a Highslide unlimited license to the Drupal community? Has someone done so already? The Highslide project page doesn't specify.

Anyone? Hell, I'd be happy to donate an unlimited license to the Drupal community!

-Mike

- Mike

I agree. It should be

radj - September 20, 2009 - 04:12

I agree. It should be included in other module comparisons as well.

Forward

lightboxes

lazyguy - September 21, 2009 - 17:35

First, props on this in depth comparison of lightbox utilities. Second, with regard to licensing costs, agreed that open source is greatly desirable, but Shadowbox, which I've used on a number of sites over the last years is only $20 for a single developer or $50 for a shop license, which is relatively trivial in comparison to other charges I see listed here.

I was delighted to find a Shadowbox integration with Drupal, since Shadowbox figures heavily in a number of my existing sites, but I was definitely disappointed that that integration was limited to a few modules.

It's obvious that some fine work was done on Lightbox2, but in terms of look/feel/operation and overall gloss/smoothness, it's a bit of an unfavorable comparison with Shadowbox and I know my clients would howl if I were to substitute LB2 (as it displays on its demo page) for Shadowbox in their sites.

But I have downloaded both modules and will continue to experiment with LB2, with particular attention to whether or not the module's own interface can be restyled (what's with the huge text and clumsy arrow navigation?) as well as whether it has a graceful crossfade transition that was not revealed on the demo.

TK

Lightbox2 and IE

Robert Coates - October 11, 2009 - 14:11

First I want to thank Stella for the great Lightbox2 Module, and yes there is a BUT

I know at the top it states that Lightbox2 performs with IE without problems, however that does not seem to be the case (after testing and looking at the recent issues).

This also is the ONLY reason I'm unable to use Lightbox2, but I do love the functionality.

Should Lightbox2 come close to performing with IE, I will be the first to switch.

I'm only posting because I found out the hard way, however many are using the module, but I can't find the workaround for IE.

Good Luck

more modules

Matt V. - October 29, 2009 - 16:10

More modules to add to the comparison are the new Pirobox Tipster module and the fancybox module.

Thickbox "has had it's day"?

steveray - October 29, 2009 - 06:42

The Thickbox site (http://jquery.com/demo/thickbox/) has this message recently posted to the top of the page:
----------------------------
While Thickbox had its day, it is not maintained any longer, so we recommend you use some alternatives.
* colorbox
* jQueryUI Dialog
* fancybox
* DOM window
* shadowbox.js
-The Management. 9.30.2009 (and Paul Irish)
----------------------------
None of the alternatives are discussed here so I presume they don't have supporting Drupal modules.
Is use of Thickbox a not-so-good idea going forward?
Thanks

Fancybox

perandre - November 4, 2009 - 23:00

There is a fancybox module for Drupal; http://drupal.org/project/fancybox.
For D6: http://drupal.org/node/430212.

 
 

Drupal is a registered trademark of Dries Buytaert.