Any one c
an help
To display all product images in a square shape with a custom size on Shopify, you can follow these steps:
If your theme doesn’t have built-in settings for this, you can use CSS to enforce a square shape for all product images:
Open Theme Code Editor:
Edit the CSS:
.product-card__image img {
object-fit: cover;
width: 100%;
height: 100%;
aspect-ratio: 1 / 1; /* Ensures a square aspect ratio */
}
.product-card__image {
width: 300px; /* Set your custom width */
height: 300px; /* Set your custom height */
overflow: hidden; /* Ensures the image doesn't overflow */
}
Save and Preview:
If you’re not comfortable editing code, use a Shopify app to automatically resize product images:
For best results, upload product images in square dimensions (e.g., 1000x1000 pixels). This reduces the need for excessive cropping or resizing.
Would you like assistance with the code or setting up an app?