Photoswipe - Transition using thumbnails with different aspect ratio
Posted: 09 Jul 2017, 20:23
I am really loving the Photoswipe addition to PG. My only gripe is the way Photoswipe is configured for the detail image (large thumbnail) opening transition. Like most PG implementations, my small and medium thumbnails are using (1:1) size ratio and my large thumbnail is using (1:1.333) size ratio. Now the problem with using an irregular ratio for the large thumbnail is the pre-loaded thumbnail image appears distorted on load. The affect is the image appears "stretched" on load and when completely loaded it gives the impression the image "shrinks" again. The issue becomes really apparent on slow internet connections and when viewing regular/square/straight photographs. Below is an example, top of image is detail image (large thumbnail) loading and the bottom is the thumbnail pre-loader. You will note how the edges of the sign do not line up even close which gives a very poor user experience.

here is a video of the transition affect over a slow connection.
If I was to use a (1:1) ratio for the detail image the photo would be significantly "cropped" removing important detail of the image. It would also miss the point considering my site is about photos. Further reading on the Photoswipe FAQ site provides specific guidance on using different-thumbnail dimensions. The recommendations are;

here is a video of the transition affect over a slow connection.
If I was to use a (1:1) ratio for the detail image the photo would be significantly "cropped" removing important detail of the image. It would also miss the point considering my site is about photos. Further reading on the Photoswipe FAQ site provides specific guidance on using different-thumbnail dimensions. The recommendations are;
Now my ask is for some help to implement this change, whether a custom code change or possibly the PG core which could include a configurable switch in the Joomla backend. I am fairly sure that most PG users have irregular large/details thumbnails and could appeal to wider group. Thank you in advance for your support.If thumbnail aspect ratio does not match large image, do not define msrc property for slide objects and enable opacity transition option (showHideOpacity:true, getThumbBoundsFn:false).