-
Dragonstorm
Hello GeneratePress team,
I recently added a product to my woocommerce store, however the thumbnail or its container is a different height from all the other products.
I’ve not been able to narrow down where the issue is coming from in the Inspect panel. Any ideas?
Thanks very much in advance!
Val
-
George
Hi Val,
The issue is that the “Tethers Torn” image has different dimensions from the other three. It’s
422×651, while the others are500×667— a different aspect ratio. When WooCommerce scales them to the same width, the height difference follows.Two options:
- Re-crop the source image to match the same aspect ratio as the others (3:4 / 500×667) and re-upload it. This is the cleanest fix.
- Force a uniform aspect ratio via CSS on the image containers. Something like:
.wc-product-image .inside-wc-product-image img { aspect-ratio: 3 / 4; object-fit: cover; }This would crop all product thumbnails to 3:4 regardless of the source image dimensions.
Option 1 is preferable since it avoids any cropping artifacts.
-
Dragonstorm
Hey George,
I didn’t realize it was smaller than the rest and uploaded a larger image. The global 3:4 thumbnail crop then fixed it down to the right size. Thanks so much!!
-
George
Ok, no problem!
- You must be logged in to reply to this topic.