With a WordPress lightbox plugin you can better display images and videos in your WordPress website and present them with a popup in a larger resolution. My personal favorite and a plug-in I like to recommend is WP Featherlight .
Why you should use a WordPress lightbox
The lightbox usually opens after clicking on the image. The picture is then displayed in full size and thus presented in a more appealing way. Especially if you show a lot of photos and illustrations on your website, I would recommend using a lightbox.
There are probably several dozen different WordPress lightbox plugins, which often differ only slightly. It is therefore difficult to make a selection.
The simplest lightbox plugin for WordPress and therefore my favorite is WP Featherlight.
I myself use the plugin on almost all of my websites. In total, it is currently installed over 40,000 times and consistently rated well.
An ultra lightweight jQuery lightbox for WordPress images and galleries.
WP Featherlight is based on the Featherlight jQuery Lightbox .
This is a very lightweight and simple script, which gets by with a few lines of code, is only 6 kilobytes in size and is therefore very powerful compared to other heavyweights.
WP Featherlight is a WordPress plugin with no settings and actually just a wrapper for the script. Once activated, it automatically adds a responsive and minimalist WordPress lightbox to all images and galleries.
It just works without a lot of configuration.
Present images in WordPress Lightbox
Images inserted in the visual editor are automatically displayed in a lightbox after clicking on the image if the image is linked to the media file . To do this, you can configure the Link to selection field accordingly when inserting the image.
As a result, the image in the post can now be displayed larger in a lightbox:
Alternatively, you can also enter an individual URL that links directly to an image file. This means that external images that are not on your own server can even be displayed in the lightbox.
Use WordPress gallery with lightbox
WP Featherlight can also be used to display images in WordPress galleries in a lightbox. Here, too, the images just have to be linked to the media file, the plug-in does the rest automatically.
Yes, I like cats 😉
More options for developers
In the documentation of the Feathlight jQuery plug-in you will find further possibilities how you can use the lightbox script.
Basically, the lightbox is activated for all elements that use the data-featherlight attribute. The value of this attribute is used as a selector for the element that is to be displayed in the lightbox.
This means that any other content can be presented in the lightbox:
<a href="#" data-featherlight="#mylightbox">Open element in lightbox</a> <div id="mylightbox">This div will be opened in a lightbox</div>
By default, the plugin also shows the image captions in the lightbox. This feature can be disabled with a little code by setting the
wp_featherlight_captions filter to false .