Enlarge image on click / image popup

Hi, I search a possibility to give the users who reads message to click on images to enlarge them.

I found that thread

and the solution:

imagen

Works in that way that it opens the image as full image in the browser, but now the user need to browse back to get into the blog.

In the end this “trick” is mentioned and I assume it should do the job if you click on that larger image that this goes back, but I did not get it working.

Does maybe even a person knows another solution that just opens like a modal on the page with a nice “X” for close that for example even react on a ESC press to close the image?

you may have a look at lightbox2, see https://julianstier.com/posts/2020/03/hugo-and-lightbox/.
it does just what you requested, incl. nice X and close on ESC :grinning:

1 Like