A Shopify store owner using the Refresh theme needs help making collection hero images display properly on mobile devices. The images look fine on desktop but are being cropped significantly on mobile screens.
Multiple solutions provided:
Most common approach: Add CSS to component-collection-hero.css (around line 73) or base.css to adjust the .collection-hero__image-container height for mobile screens (max-width: 749px). Suggested heights range from 20rem to 30rem.
Alternative method: Add custom CSS with object-fit: contain property directly to theme.liquid file before the </body> or </head> tag to ensure images resize without cropping.
Follow-up issue: After initial fix, images appeared too small on mobile. The root cause is aspect ratio mismatch - the user’s images have 1:1 ratio while mobile displays need 2:3 ratio. Creating images with proper 2:3 aspect ratio (instead of adding 1024x2048px backgrounds) would resolve the sizing conflict between desktop and mobile views.
The discussion remains ongoing as the user seeks a solution that works well on both desktop and mobile simultaneously.
Summarized with AI on November 7.
AI used: claude-sonnet-4-5-20250929.
Could someone please help me with what I need to do to get the hero images for my collections to auto-resize so they look in a mobile view? At the moment its looking fine on my laptop but on my phone its chopping heaps of the image out.
Hello @OrangeFoodMan
Go to online store ---------> themes --------------> actions ------> edit code------->assets-----> component-collection-hero.css ----> line number 73
search this code
Hi there! It sounds like you need to adjust the CSS for your hero images to make them responsive. Try setting the images to This should help them resize properly for mobile view. Hope this helps!
Scroll to the bottom of the theme.liquid file, and just above the closing tag, add the following custom CSS code:
The object-fit: contain; property ensures that the image will resize to fit within its container without cropping. If the image still doesn’t fit perfectly, you may consider using other values like cover or adjusting the image’s aspect ratio manually.
Hey @OrangeFoodMan, the image you provided has a 1:1 aspect ratio, while the mobile screen you displayed the box on has a 2:3 aspect ratio. Kindly add an image with a 3:2 aspect ratio, instead of 1:1.
Thats worked pretty well but now the images appear really small like
in the image below. I’ve been adapting the size of the images to
include a background of 1024px x 2048 px which makes them look good on
the desktop but small on mobile, and when i use the original image it
looks good on mobile but bad on desktop (see below). Is there any way
to make the images adapt to look good in both?
Image 1 is when its good on desktop and small on mobile
Image 2 is when its good on mobile but too big on desktop