Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi,
The images I uploaded seem to be very large and don't fit on the screen. When viewing an item, customers must scroll down to see the complete image. I would like the images to be a smaller size but can't manually edit them all.
Any solutions?
Solved! Go to the solution
This is an accepted solution.
Hi @KMichael,
Go to Assets > base.css and paste this at the bottom of the file:
.global-media-settings img {
width: auto !important;
margin: auto;
right: 0;
}
.global-media-settings {
padding-top: 100% !important;
}
Hope it helps!
This is an accepted solution.
Hi @KMichael,
Please add code:
.product-grid .card .media {
background: #fff !important;
}
.product-grid .card__media .media img {
height: 100% !important;
width: auto !important;
margin: auto;
right: 0;
}
This is an accepted solution.
Hi @KMichael,
Please change code here:
Code:
.global-media-settings {
padding-top: 50%!important;
}
This is an accepted solution.
Hi @KMichael,
Please go to base.css file and remove code here:
it will display fine
This is an accepted solution.
Hi @KMichael,
Go to Assets > base.css and paste this at the bottom of the file:
.global-media-settings img {
width: auto !important;
margin: auto;
right: 0;
}
.global-media-settings {
padding-top: 100% !important;
}
Hope it helps!
Thank you for your help.
I would also need help with coding to resize the image when shown by "you may also like"
It only shows a fraction of the image there because the image was originally too large.
Could you help me with that?
This is an accepted solution.
Hi @KMichael,
Please add code:
.product-grid .card .media {
background: #fff !important;
}
.product-grid .card__media .media img {
height: 100% !important;
width: auto !important;
margin: auto;
right: 0;
}
Thank you.
This has helped with images that were too long to be shown. But some images are too wide to be shown fully. I am attaching an image of a loveseat. The image is chopped at the sides. What could be done to fix this?
This is an accepted solution.
Hi @KMichael,
Please change code here:
Code:
.global-media-settings {
padding-top: 50%!important;
}
it did help for most items, some items though still have the images not showing fully.
How should I edit that code?
Hi,
The image sizes are still not ideal.
Could you please try to help me figure it out?
Still, some photos are too wide to display completely.
Maybe we should make all of the images taller so that more of the width is visible?
Hi @KMichael,
Please add code:
.product-grid .card__inner {
--ratio-percent: 50% !important;
}
Hi,
It is still not working properly.
What else could be done to fit it to screen?
Hi @KMichael,
I checked and it shows fine, this is the section you checked?
This is an accepted solution.
Hi @KMichael,
Please go to base.css file and remove code here:
it will display fine
Much better. Many items show fully now. Is there any further solution for items like these?
Hi @KMichael,
It will be really hard for everyone, if you want to, all images will be affected. Refer:
Hi LitComm! Does this apply to my own shopify too? How can I resize images freely and copy the size of the middle image from the Origin theme? Thank you..
Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025Discover opportunities to improve SEO with new guidance available from Shopify’s growth...
By Jacqui May 1, 2025