On a Woocommerce site, product images can be portrait or landscape, and have varying sizes. On catalog pages, I need product images to display so that there is a max length (240 px) for the long side, whether the long side is horizontal or vertical. Unfortunately, on this page…(like: https://thomasbucci.com/gallery/themes/houses/)
… the portrait images in the 5th and 7th rows are 240px wide and then much taller.
Also, this needs to work with both desktop (wide) and mobile, where there is one column of images (one product image/row).
I know this is possible. Years ago, someone customized a different theme for the same site so there was one max length on long side. The site has been migrated to GeneratePress and I can’t figure out how to replicate this functionality.
We have rejected one approach, which is to create square boxes that contain the product image on both exes. That approach creates gaps of varying heights between the image and the image titles below the product images. Also, rows seem to be centered vertically and we want them flush top.
We can use 4 images per row on desktop if that helps.
Thank you for any help.