DaveL1
May 23, 2024, 12:02am
1
I’ve seen people post code in this forum that can be plugged into different sections of the Theme’s code to get all of the photo aspect ratios the same. Unfortunately, the ‘Trade’ Theme has different code sections than the ones with instructions, so I was hoping someone could point me in the right direction.
Much appreciated!!
tim_1
May 23, 2024, 5:03am
2
This is because you do not need any code.
In Customizer, when on collection page, open settings for “Product Grid” section.
Under “Product card” heading you can select your image aspect ratio options – select Portrait or Square instead of default “Adapt…”
If necessary, you can then override aspect ratio by adding code to Custom CSS setting of this section like:
.card, .card__inner {
--ratio-percent: 66% !important;
}
1 Like
Tim,
Thanks for your help! Unfortunately, I don’t have ‘Adapt to Image’ as an option under Product Card (see image).
Alternatively, when I put the code you suggested into Custom CSS, it’s cropping the photos as such:
tim_1
May 29, 2024, 2:41am
4
Of course you can change the 66% aspect ratio to whatever suits your products.
And obviously, if images do not fit, they will be cropped either vertically or horizontally…
1 Like