All things Shopify and commerce
I had the similar problem before that was resolved for portrait images in: https://community.shopify.com/c/shopify-discussions/how-to-reduce-image-size-on-trade-theme/m-p/2781...
I followed these Steps:
1) Go to Online Store
2) Edit Code
3) Find theme.liquid file
4) Add the following code in the bottom of the file above </body> tag
<style> @media screen and (min-width: 768px) { .product.grid { justify-content: space-around !important; } .product--right .product__media-wrapper { max-width: 20% !important; } } </style>
RESULT & current issue:
It works fine on portrait images like this one: https://ik-parts.com/products/ikea-100358
But now landscape images are tiny: https://ik-parts.com/products/ikea-10090009
Would it be possible to limit the max height instead (and not the max width)?
You can try to update your code below to check if it solve the issue with your image
<style>
@media screen and (min-width: 768px) {
.product.grid {
justify-content: space-around !important;
}
.product--right .product__media-wrapper {
max-width: 20% !important;
}
.card__media .media img {
object-fit: contain !important;
}
}
</style>
- Helpful? Like and Accept solution! Support me! Buy me coffee
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
I found the correction:
<style>
@media screen and (min-width: 750px) {
.product.grid {
justify-content: space-around !important;
}
.product--right .product__media-wrapper {
max-width: 50% !important;
}
.product-media-container.constrain-height{
--constrained-height: 300px !important;
}
</style>
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024