Lighbox does not currently work with collections i in webflow, so if you want to create a photo gallery that opens lighbox when an image is clicked, you will have to resort to some creative measures. But I've found a link to a workaround where you can get lightbox and collections to work perfectly: Dynamic lightboxwith cms workaround works perfectly
Here is a video that shows in detail how to build a photo gallery with lightboks in CMS. Works awesome: New tutorial cms galleries made easy
And here's the link to the javascript code: https://forum.webflow.com/t/full-cms-lightbox/33669
Create a text field in the CMS that you call ALT TEXT. Enter alt= "” right after img src (as usual) And from ADD FIELD select ALT TEXT and insert it between "”
Remember to insert a transparent image in the img src field in the HTML code (the first place you are going to put the image in the EMBED) That is in order for all the images to have the same height. It must first be entered on the page— make a section and put the image in it. Then open the image in the browser and copy the image url. Paste it right after img src into the Embed code.
When the screen width on which you view the gallery goes down to mobile, the navigation arrows on each page disappear, but swipe is active, so you can continue to scroll back and forth between images.