The most lightweight jQuery lightbox plugin for WordPress images and galleries.
Plugin Description:
This minimal WordPress lightbox plugin adds high performance, responsive jQuery lightbox functionality to your images. When standard WordPress images/galleries are clicked, the background fades out into black as images display in lightbox popup. Galleries can be navigated with on-screen arrows, touchscreen swipes, or pressing arrows keys.
To load WordPress images and galleries lightbox:
- You must select the “Media File” option when choosing where thumbnails should link. You can also select the “Custom Link” option if it links directly to an image file. This should work for any image file, even if it’s hosted on another website.
- Enable on each post by checking “Enable lightbox” on the WP Featherlight settings.
- You can also lightbox videos, iframes, and ajax content by adding data attributes to your content. For more details on custom content loading, check out the featherlight documentation.
My plugin is simply a forked version of the original WP Featherlight plugin. Only difference is the original loads the featherlight CSS/JS on every page whereas mine only loads when you manually enable. Big thanks to Yin and Walter for contributing.
Features:
- Ultra-lightweight – even more lightweight than the original WP Featherlight since the lightbox CSS/JS is not loaded automatically.
- Manual activation – to enable lightbox functionality, simply click the checkbox in your post settings.
- Retains WP Featherlight features – has all the same features and filters as the original WP Featherlight plugin (up to version 1.3.3)
Support:
- The plugin is free for your personal/commercial use, but do buy me a beer if you like it. Enjoy! 🙂
- I’m not responsible for what you do with it. If you have issues, you can ask for support on the WP.org repo.
Download WP Featherlight Disabled:
Regev
Once upon a time in a land far away
There was a man named Johnny who was sparring all day
But to speed up our WordPress sites was his true life mission
So he started forking and optimizing plugins into the most perfect edition
Johnny Boy thank you from the bottom of our hearts
May your TTFB never be as high as your smarts
thanks for another awesome plugin
– Your readers
Johnny
“May your TTFB never be as high as your smarts”….that’s still a lot of room! 🤣🤣
Tobias
Hi Johnny,
I love your blog. Thumbs up! I likes your articles about oxygen and SEO :)…
Is there an option to enable the lightbox automatically for normal post type pages? Such a feature would be awesome to activate the lightbox on all pages or posts or custom post types.
Kind regards,
Tobias
Johnny
Ha…for that option, don’t even bother with my plugin. Just install the original one which has it enabled globally. Mine was made for the people who like everything off unless manually turned on.
Tobias
You are right. I can disable the script for all pages by myself and enable it only for posts. If a customer want posts with lightbox but without explain them to check the box :).
olivier Cotasson
Hello Johnny,
Though I came with a different approach :
I use the (original) featherlight plugin for an optional ACF gallery.
Since it is optional I only load the CSS and JS files required in my template file when images are found. And disabled the plugin altogether so that he does not load on each and every page.
Thanks for the heads-up regarding this plugin. Since you’re a stickler about performance, I believe this is the best plugin in that regard.
Johnny
Heh heh, that’s clever too! I like that your idea is automated. Thanks for sharing your tactics on this.
Jonathan
Hi Johnny,
Tried your forked version with Oxygen and it’s not working. Would you know why?
Johnny
Do you have a url?
Jonathan
No, working on a local environment…
Jonathan Camp
How do I enable the filter to show non-compressed AND non-combined JS and CSS files please…?
Paul Bystrzan
I really like it, but as You – I forked it to have one thing that Your plugin don’t have – get rid of jQuery. The script already support vanilla JS, but for some reasons your plugin even in 2024 needs a jQuery.
For Block Themes it’s better to have vanilla setup – even if it’s 5-10 lines of code more.
Best regards,
Paul Bystrzan
Johnny
Thank you for your contribution!