Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Is there a way to add code to make all product thumbnails display as the same size on catalog pages? So for example have all photos display as squares in the below screenshot, but then have the original photos still when you click on the product. I'm trying to avoid having to manually crop all of my photos.
You can rework your code to use background images instead of regular images and then give your container a specified height and width:
https://codepen.io/ninthony/pen/PopPNXd
Or alternatively you can give the images a set width and height with CSS and set the image element's object-fit property to "cover":
https://www.digitalocean.com/community/tutorials/css-cropping-images-object-fit
Where in the liquid file would I implement this code?