Product Gallery Slider cropping photos on different mobile views

Solved

Product Gallery Slider cropping photos on different mobile views

Domisana
Excursionist
30 0 8

HI, my website is domisana.com

 

Even though I always crop my photos square I noticed that different phones change image ratio so that some of my products have cropped photos

 

Example my mobile

WhatsApp Image 2024-12-26 at 01.02.47_3baa31da.jpg

 

Example some other screen mobileScreenshot_22.png

 

 

Can this be fixed, so that gallery slider always keep locked 1:1 aspect ratio for photos, not crop them depending on the screen size,

 

Thanks

Accepted Solution (1)

DaisyVo
Shopify Partner
2848 343 401

This is an accepted solution.

@Domisana 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

.product__media img {
    object-fit: contain !important;
}

 

Here is the result: image_720.png

 

I hope this helps 

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

View solution in original post

Replies 2 (2)

DaisyVo
Shopify Partner
2848 343 401

This is an accepted solution.

@Domisana 

 

To complete your requests, please follow these steps:
  1. Go to Shopify Admin > Online Store > Theme > Customize > Theme Settings > Custom CSS https://prnt.sc/i8ljAMlHJUKl
  2. Paste the code provided into the Custom CSS section.

 

.product__media img {
    object-fit: contain !important;
}

 

Here is the result: image_720.png

 

I hope this helps 

 

Best,

 

Daisy

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

Dan-From-Ryviu
Shopify Partner
10793 2133 2251

Hi @Domisana 

You can solve this issue by adding this code to Custom CSS in Online Store > Themes > Customize > Theme settings. 

@media (max-width: 749px) {
.product__media img { object-fit: contain !important; }
}

 

- Solved it? Hit Like and Accept solution! ❤️Buy Me Coffee❤️
- Reton: Loyalty & Rewards - Earn points through tasks, redeem for discounts, and enjoy exclusive VIP rewards!
- 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.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.