lightGallery hash plugin lets you to provide unique url for each gallery images. lightGallery will record slide history and allows you to travel to previous slides via browser back button.If you have multiple galleries on one page you have to provide unique id's for each gallery via galleryId
setting.
<div id="hash"> <a href="img/img1.jpg"> <img src="img/thumb1.jpg" /> </a> <a href="img/img2.jpg"> <img src="img/thumb2.jpg" /> </a> ... </div>
lightGallery(document.getElementById('hash')); // if You have multiple galleries on same page you have to set unique id's for each gallery. /* lightGallery(document.getElementById('hash'), { galleryId: 2 }); lightGallery(document.getElementById('hash'), { galleryId: 3 }); */