Solved

Resizing all product images to same size

Sebas1221
Excursionist
19 0 3

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 Screenshot 2022-05-25 102611.pngI mean

Accepted Solution (1)
Savior
Shopify Partner
537 108 161

This is an accepted solution.

@Sebas1221 

Add this too

#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner .card__media .media img {
object-fit: contain !important;
}
banned

View solution in original post

Replies 7 (7)

Savior
Shopify Partner
537 108 161

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;
}

 

Savior_0-1653473840927.png

 

banned
Sebas1221
Excursionist
19 0 3

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

Sebas1221
Excursionist
19 0 3

Screenshot 2022-05-25 112638.png

Savior
Shopify Partner
537 108 161

@Sebas1221 

Please try the updated code

#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner {
    --ratio-percent: 100% !important;
}
banned
Sebas1221
Excursionist
19 0 3

Not sure what problem is I would like it to be like the first bottles

dd.png

Savior
Shopify Partner
537 108 161

This is an accepted solution.

@Sebas1221 

Add this too

#ProductGridContainer .card-wrapper .card.card--standard.card--media .card__inner .card__media .media img {
object-fit: contain !important;
}
banned
indyhome19
New Member
6 0 0

Would this code also work for the Craft theme to make all images the same size on the collection pages?