You need a custom layout of images instead of an 'out of the box' gallery layout, but then you still want them clickable inside a lightbox with navigation buttons to go between images while staying inside the lightbox
Requirements:
- Put your photos in a container/row with ID of #gallery
- If you're using BB with photo modules, make sure Link Type is set to none in the module settings (not Lightbox)
- Have magnificPopup enqueued. If you're using BB Theme, you can enable it in Customizer > Content > Lightbox. If not, you can enqueue it yourself
- line 14 in the js is telling it to look at data-src to get the image URL - this is because I use lazy loading and this is where the URL is stored before loading. If you aren't using lazy loading, change line 14 to
item.src = item.el.attr('src');
Customize as you need: https://dimsemenov.com/plugins/magnific-popup/documentation.html#gallery