thomasvantuycom / craft-cloudinary

Cloudinary integration for Craft CMS
MIT License
5 stars 3 forks source link

CP Thumbnail Transforms w/h dimensions reversed? #2

Closed robinbeatty closed 1 year ago

robinbeatty commented 1 year ago

Only a few minutes into using your plugin, but expecting to use this as a long term solution for Cloudinary integration – I noticed that the thumbnails in Craft CP asset views are wrongly cropped: it looks like somewhere in the pipeline the width/height dimensions are being reversed (width = height and height = width) and therefore the transformation that Cloudinary delivers appears eccentrically cropped in the center.

E.g.

Original image (asset preview panel, correct)

Screenshot 2023-11-14 at 13 53 44

Wrongly cropped image (Assets field / Assets picker thumbnail view)

Screenshot 2023-11-14 at 13 53 53

Likewise with vertical images:

Original (asset edit modal):

Screenshot 2023-11-14 at 13 58 37

Wrongly cropped thumbnail:

Screenshot 2023-11-14 at 13 58 49

Not sure where it's happening but looks to me like the width is being given the height's value and vice versa somewhere along the way...

Would be great to get a fix! Many thanks, cheers for great plugin.

thomasvantuycom commented 1 year ago

Hi @robinbeatty,

Thank you for letting me know. There was an inconsistency in the crop behaviour between Craft CMS and Cloudinary. This should now be fixed and released in version 1.2.1.

robinbeatty commented 1 year ago

Speedy! Many thanks