Hi im just wondering is it possible to resize all of the images of my products on the shop page using some code before I go at it using photoshop. Much appreciated
My website is rapro.ie and ill attach an image to show what
I mean
A user seeks to resize product images on their shop page to uniform dimensions using CSS code rather than manually editing each image in Photoshop.
Initial Solution Attempted:
#ProductGridContainer .card-wrapper .card with aspect-ratio: 100% !important to the base.css fileIterative Troubleshooting:
object-fit: contain !important on card media imagesCurrent Status:
Hi im just wondering is it possible to resize all of the images of my products on the shop page using some code before I go at it using photoshop. Much appreciated
My website is rapro.ie and ill attach an image to show what
Hello @Sebas1221
Go to your code editor ‘Assets > base.css’ and paste the below code at the bottom of the file.
#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner {
--ratio-percent: 100% !important;
}
unfortunately I did this and it did not work i have updated it on my website if you look now you will see they are still all different sizes
Please try the updated code
#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner {
--ratio-percent: 100% !important;
}
Add this too
#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner .card__media .media img {
object-fit: contain !important;
}
Would this code also work for the Craft theme to make all images the same size on the collection pages?