JavaScript for imgur gallery generation for PhotoSwipe and Pelican-Elegant

Hi, Using the following code from the Browser console: console.log(""); var images = $$("img"); for (each in images) { console.log(` <a href="${images[each].src}" data-size="4032x3024"> <img src="${images[each].src}" width="403" height="302" alt="Image description" /> </a> `); } console.log("</div>"); It will output a copy-paste ready code for integrating in your blog post and leverage the picture gallery. Warning Review the data-size to make it match the image size as PhotoSwipe requires it to match image and adjust the figcaption entry....

February 19, 2020 · 1 min · Pablo Iranzo Gómez
This blog is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to