Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Lean Lightbox (WordPress plugin)

Tiny lightbox plugin based on Imgix's Luminous. Opens all links to *.(jpg|jpeg|png) in a lightbox. If a link is part of a gallery, the opened lightbox will be a collection that can be navigated.

There are no configuration options. If it doesn't work for your case I recommend forking it and adjusting execution code for Luminous.

Or if you think something should be changed here, submit a pull request.

Browser compatibility

The execution coded uses ES2015 which means no Internet Explorer. Works in Edge and everywhere else.


  • No configuration
  • Includes 2 files from a CDN at the end of <body>:
    1. 1 kB CSS
    2. 3.7 kB JS
  • Appends a <script> tag at the end of <body> that will attach the lightbox to image and gallery links.


WP_CONTENT_DIR is the directory containing plugins, themes, uploads, etc. Default is /path/to/wordpress/wp-content.

Download the zip and extract it to WP_CONTENT_DIR/plugins/lean-lightbox.

CLI one-liner:

# Change the path at the end:

curl -L | tar zxf - --transform=s/lean-lightbox-2.3.2/lean-lightbox/ -C /path/to/wordpress/wp-content/plugins/

Implementation Notes

If you have elements with z-index > 0 on your website, add the following to your CSS:

/* Lean-Lightbox: adjust the z-index value for the lightbox */
.lum-lightbox { z-index: 100; }

Why is this not in the WordPress plugin directory?

Two reasons:

  1. I forgot how to use SVN (I don't understand why WP is still using it).
  2. It breaks the guidelines so I don't intend to submit it for review.

The problem is this:

8. The plugin may not send executable code via third-party systems. ...

  • Calling third party CDNs for reasons other than font inclusions; all non-service related JavaScript and CSS must be included locally ...

The plugin includes Luminous from Including this locally would go against everything the word "lean" in the name stands for. The only time you'd include this locally is if you're bundling your Javascript and CSS in a custom template. Otherwise it's an additional HTTP request which may as well go out to a CDN.



  • Update Luminous to 2.3.2


  • Update Luminous to 2.3.1


  • Update Luminous to 2.0.0


  • Move CSS to the end <body>.
  • Documentation updates


  • Use Subresource Integrity for files loaded from CDN.
  • Print resources directly to wp_head and wp_footer because using the wp_enqueue_ functions yields zero benefits.


  • Initial public release


Lean Lightbox is licensed under the MIT license. See


WordPress lightbox plugin for single image links and galleries.




No packages published