Problem: In the gallery paragraph the real image is linked. The link is missing size properties of the target image. Therefore the same ration as the thumbnail is assumed. That can lead to skewed images. Also the real images can be very large which can lead to performance issues.
Problem: In the gallery paragraph the real image is linked. The link is missing size properties of the target image. Therefore the same ration as the thumbnail is assumed. That can lead to skewed images. Also the real images can be very large which can lead to performance issues.
The paragraph type gallery should link from image style thumbnail to image style gallery. For this a new module should be enabled and configured: https://www.drupal.org/project/image_formatter_link_to_image_style
Then the markup must be configured in a way that the overlay JS can extract the dimensions of gallery style for the link.