How to make Image fit on the page in refresh theme

Solved

How to make Image fit on the page in refresh theme

seiza123
Excursionist
22 0 7

Hello,

 

I am wondering if there is a way to make an image 'fit to size' on both desktop and mobile in the refresh theme. 

please refer to images so you can understand

 

seiza123_0-1725849303525.png

seiza123_0-1725849388766.png

 

 

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
9534 1918 1954

This is an accepted solution.

Hi @seiza123 

Please add this code to Custom CSS of that section and check again 

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

If it is still not working, please share your store URL so I can check.

- Helpful? Like and Accept solution! or 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.

View solution in original post

Replies 3 (3)

Dan-From-Ryviu
Shopify Partner
9534 1918 1954

This is an accepted solution.

Hi @seiza123 

Please add this code to Custom CSS of that section and check again 

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

If it is still not working, please share your store URL so I can check.

- Helpful? Like and Accept solution! or 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.

seiza123
Excursionist
22 0 7

this worked very well. thankyou. Only issue is a different colour background behind the image

Vinsinfo
Shopify Partner
425 143 142

@seiza123 Please share your store URL to help you on this.

Please reach out to [email protected] for any enquires related to Shopify.
Our Services: Custom Theme Development, Theme Customization, Custom Feature Implementation, Data Migration, Custom APP Development, Website Optimization and Google Merchant Center Support