lightGallery hash plugin lets you to provide unique url for each gallery images. 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>
$('#hash').lightGallery(); // if You have multiple galleries on same page you have to set unique id's for each gallery. /* $('#hash').lightGallery({ galleryId: 2 }); $('#hash').lightGallery({ galleryId: 3 }); */