The product images on my website have varying aspect ratios—some are 1:1 while others are 2:3. When using product blocks, whether dynamic or static, is there a way to automatically enforce a 1:1 aspect ratio for all displayed images?
Solved
How Can I Automatically Enforce a 1:1 Aspect Ratio for Product Images in Dynamic and Static Product Blocks?
Best answer by DishaM13
Hi
In Klaviyo, there’s no built-in setting to force a 1:1 aspect ratio for product images. The best way is to use square (1:1) images in your product feed. If that’s not possible, you can use this custom HTML block to crop images to a square:
<div style="width: 100%; aspect-ratio: 1 / 1; overflow: hidden;">
<img src="{{ item.image_url }}" style="width: 100%; height: 100%; object-fit: cover;" />
</div>This will make all images display as perfect squares in your emails.
Log in to the Community
No account yet? Create an account
Use your Klaviyo credentials
Log in with Klaviyo
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
