Shopify Horizon guide

How to make product images smaller in Shopify Horizon

What you’ll need

  • A duplicate of your theme to test on

    How to get this: A duplicate of your theme to test on
    1. Online Store › Themes › … on your theme › Duplicate.
    2. Make the change on the copy, preview it, and publish only when it works.

    Step-by-step guide (opens in a new tab)

  • The theme editor (to paste into Theme settings › Custom CSS; no code editing)

    How to get this: The theme editor
    1. Online Store › Themes › Edit theme (on a copy of your theme if you want to test first).
    2. Add section or Add block › Custom Liquid, paste the code, then Save.

    Step-by-step guide (opens in a new tab)

Get the photo width CSS

With Horizon’s settings (no code)

  1. Online Store › Themes › Customize on your Horizon theme (use … › Duplicate first if you want to try it on a copy).
  2. In the page menu at the top, pick Products › Default product (or the product template you use).
  3. Click Product information. Turn on Equal columns for a 50/50 split; Limit product details width then appears to keep the text column narrow.
  4. Click the Product media block inside it. Set Aspect ratio (Auto, Portrait, Square or Landscape) and turn on Constrain to screen height so a tall photo never fills more than the screen.
  5. Save.

Any other width (CSS)

Horizon splits the page in a 2:1 ratio on screens 1200 px and wider, and gives the details column a fixed sidebar width below that. The CSS below replaces the split with your own share and leaves phones alone. Leave Equal columns off, because it uses a different layout the rule doesn’t change.

Theme settings › Custom CSS (photos take 40%)
@media screen and (min-width: 750px) {
  .product-information__grid.product-information--media-left:not(.product-information__grid--half) {
    grid-template-columns: minmax(0, 40fr) minmax(0, 60fr) !important;
  }
}

Questions

Will the photo get blurry?

No. Shopify serves an image sized for the space it takes, so a narrower column loads a smaller file.

My photos are on the right. Does the CSS still work?

The builder writes a second rule for Media position: Right, so both layouts are covered.

More guides