How to add lightbox effect for images in WordPress

Channel: Web Development Guides Linux
Abstract: to images or PDF’s that should not be put in a lightboxSo here is a super easy step-by-step explanation of how to add a lightbox to an image in WordPr

Adding a lightbox effect to images, i.e. making them clickable and showing a zoomed version of the original image like on this page, is super simple on WordPress sites – or so it appears when reading through the various online tutorials on this topic. However, one crucial bit of information which is often omitted is that images need to be linked to themselves in order for the various lightbox plugins to work! So here is a super easy step-by-step explanation of how to add a lightbox to an image in WordPress.

1. Add your image2. Hover over the image and click on 「Insert link」3. Select 「Media File」4. Install and activate a lightbox plugin

There are a great number of excellent lightbox plugins available for WordPress. Some plugins that I can recommend include:

  • ARI Fancy Lightbox
  • Simple Lightbox
  • WP Featherlight
  • Easy FancyBox

I am currently using the ARI Fancy Lightbox.

5. The image should now be clickable!6. Add link class 「no-lightbox」 to images or PDF’s that should not be put in a lightbox

Ref From: techguides

Related articles