With lossless compression enabled when clicking on a gallery image it opens the image in a new tab instead of just opening the image in a self-contained lightbox on the site. If the lossless compression is disabled the site functions properly. and when clicking on an image it opens in the same tab in a lightbox.
Example (lossless compression enabled): https://derekpalmer.photo/project/370z
I currently build the galleries with the following code: https://www.codepile.net/pile/zQ7O5RQy