No More Cropped Collection Photos: A Simple CSS Fix for Zoomed-In Shopify Images

Hey fellow store owners! Ever uploaded a beautiful collection image to your Shopify store, only to find it looking strangely zoomed-in or cropped on your live site? You’re definitely not alone. It’s a super common frustration that popped up in a recent community discussion, and the good news is, there’s often a straightforward fix that doesn't require you to be a coding wizard. I was following a thread started by DoctorGreenbud, who was pulling their hair out because their "category photos" – which they later clarified were collection photos – were showing up way too zoomed in. Screenshot_27-8-2026_151611_strainenvy.com This is a classic example of a theme’s default styling trying to make images fill a space, sometimes at the expense of showing the whole picture.

Why Does This Happen? Understanding object-fit

The core of this issue usually boils down to a CSS property called object-fit. Think of it like how a TV or monitor handles different aspect ratios.
  • object-fit: cover: This is what many themes (including DoctorGreenbud's Studio theme) use by default. It tells the image to fill the entire content box, cropping anything that doesn't fit to avoid empty space. Great for hero banners where you want a seamless look, but not so great for detailed collection images where every pixel matters.
  • object-fit: contain: This is our hero! It tells the image to scale down to fit entirely within the content box, preserving its aspect ratio. If the image and the box have different aspect ratios, you might see some empty space (like letterboxing), but the whole image will always be visible.

First Steps: Checking Theme Settings

Before diving into any code, it’s always smart to check your theme’s built-in options. As Kai_xing, another helpful community member, pointed out, some themes offer settings like "Image ratio" or "Image fit" directly in the theme editor. You'd typically find these under the specific section settings for your collections. DoctorGreenbud, using the Studio theme, confirmed that there were "no settings at all for images in the theme editor or in the collection section." Screenshot_27-8-2026_165019_admin.shopify.com Screenshot_27-8-2026_16495_admin.shopify.com This is where a tiny bit of custom CSS comes in handy!

The Simple CSS Fix: Getting Your Images to contain

Thankfully, community member Maximus3 swooped in with a super concise and effective piece of CSS that fixed DoctorGreenbud's problem "like a charm." This snippet overrides your theme's default object-fit: cover and replaces it with object-fit: contain specifically for your collection images. Here's the magic code:
.media > img {
  object-fit: contain;
}

How to Implement This CSS in Your Shopify Store:

This is easier than you might think, even if you're "fearful of coding" like DoctorGreenbud was!
  1. Log in to your Shopify Admin: Go to your store's backend.
  2. Navigate to Themes: In the left sidebar, click on "Online Store" > "Themes."
  3. Edit Your Theme: Find the theme you're currently using (or preferably, a duplicate theme for testing!) and click "Actions" > "Edit code."
  4. Find "Custom CSS": In the theme editor, look for a file named theme.liquid or, more commonly and safely, a section specifically for "Custom CSS." Many modern Shopify themes have a dedicated "Custom CSS" field, often found under "Assets" (e.g., base.css, theme.css, custom.css) or directly in the theme editor's customization options for certain sections. Maximus3's screenshots show it's often a dedicated section within the theme customizer. Screenshot 2026-08-27 173011
  5. Paste the Code: Scroll down to the very bottom of your "Custom CSS" file or section and paste the code snippet provided above. Screenshot 2026-08-27 173417
  6. Save Changes: Click the "Save" button.
  7. Preview Your Store: Visit your collection pages to see the full images, no longer cropped!
It's a small tweak, but it makes a huge difference in how your products and collections are presented. Kai_xing specifically confirmed this fix should target the collection hero image without affecting product card images, which is exactly what we want. This kind of problem-solving is a testament to the incredible power of the Shopify community. It's awesome to see store owners helping each other out with practical solutions that can genuinely improve their online presence. If you're looking to start your own online store or optimize an existing one, remember that a strong visual presentation is key, and simple adjustments like this can make all the difference. You can always start building your dream Shopify store with confidence, knowing there's a huge community ready to help you navigate these kinds of challenges. Don't be afraid to poke around your theme settings or even try a little custom CSS – sometimes the simplest solution is the most impactful!
Share:

Start with the tools

Explore migration tools

See options, compare methods, and pick the path that fits your store.

Explore migration tools