Adding Lightbox to WordPress Images
Come across this issue when I had to edit a website on WordPress running the Enfold theme.The image was a big size and within his theme showed really small so I needed a solution. Decided the best option was to put the image into a Lightbox so the user could click the image for it to zoom in on both mobile and PC.
How to add
Adding this is a doddle… You’ll just need to add this code to the image source code.
<code><a href=”http://your.site/” rel=”lightbox”>Click me to open in lightbox</a></code>
So within the ‘Text’ within WordPress, you’ll see something like this….
<a href=”/wp-content/uploads/2019/05/1.png” rel=”lightbox”><img class=”alignnone size-full wp-image-594″ src=”/wp-content/uploads/2019/05/1.png” alt=”Image 1″ width=”1437″ height=”851″ /></a>
Any issues – feel free to comment and I’ll try and help you!