It doesn’t work properly because the HTML syntax is not valid.
The data-rel parameter for image links is like this: data-rel=”prettyPhoto[single_pretty_photo]”
While it should be like this: data-rel=”lightbox” or (better) data-rel=”lightbox-gallery-n” where n is the unique number of the gallery (1,2,3, etc.),
Do you use visual composer (WP Bakery) plugin to display the images?
If so you’d have to adjust the VC templates and change the line of code that generates this HTML (data-rel=”prettyPhoto[single_pretty_photo]”) or give us a FTP access so we can do that for you.