Z O B A E R

Loading

Guide Shopify guide

Shopify Image Zoom: Set Up Hover Zoom in Dawn and Horizon

Turn on Shopify image zoom in Dawn and Horizon, add free tested hover zoom code to Horizon, and fix blurry or broken zoom.
Zobaer Hossain
Zobaer H.Shopify Select Partner · 10+ years
Shopify image zoom guide: hover zoom and lightbox zoom in Dawn and Horizon, by Zobaer H.

Shopify image zoom lets shoppers look closely at a product photo before they buy. They can check the stitching, the texture of the fabric or the stone in a ring. Online, that close look is the nearest thing to holding the item in their hands.

The good news: both free Shopify themes, Dawn and Horizon, have zoom built in. You switch it on in the theme editor, with no app and no code. But the two themes zoom in different ways, and “zoom on hover” often seems broken when it isn’t. I set up product image zoom on many client stores, and the same few problems come up every time.

Here is what you will learn:

  • How to turn on Shopify image zoom in Dawn and in Horizon, step by step
  • What each zoom option does on a computer and on a phone
  • A tested, free code to add zoom on hover to Horizon
  • The best image size so zoomed photos stay sharp
  • Why zoom on hover isn’t working, and how to fix it

What Shopify image zoom does

Image zoom shows a bigger, sharper view of a product photo when a shopper clicks, taps or points at it. Shopify themes use three kinds of zoom:

  • Lightbox: the photo opens in a full-screen window, larger than on the page.
  • Hover zoom: on a computer, part of the photo is magnified right where the mouse points.
  • Pinch zoom: on a phone, the shopper spreads two fingers to zoom in.

The setting lives in your product page template, not in your product. So you set it once, and it works for every product that uses that template.

How to turn on Shopify image zoom in Dawn

Dawn has a Zoom setting in the Product information section with three choices. I checked these labels in Dawn’s own theme files (version 16.2.0, as of November 2026).

Steps in Dawn

  1. In your Shopify admin, go to Online Store, then Themes, and click Customize.
  2. In the drop-down at the top, choose Products, then Default product.
  3. In the left sidebar, click the Product information section.
  4. Scroll down to the Media heading and find Zoom.
  5. Choose Open lightbox, Click and hover or No zoom.
  6. Click Save.
Shopify image zoom setting in the Dawn theme editor: Product information section, Media, Zoom drop-down
Dawn: the Zoom setting sits under Media in the Product information section.

What each Dawn option does

  • Open lightbox (the default): a click opens all product photos in a full-screen window. On a phone, the photo opens wider than the screen, so the shopper can drag around it to see details.
  • Click and hover: on a computer, the shopper clicks the photo once. It zooms in to twice its size, and the zoomed area follows the mouse. A second click, or moving the mouse off the photo, closes it. On phones and touch screens, a tap opens the lightbox instead.
  • No zoom: the photos can’t be enlarged at all.

Note the name: Click and hover. Dawn’s zoom on hover starts after a click, not on its own. Many store owners think it is broken because nothing happens when they only move the mouse.

The Featured product section, the one you can add to your home page, has its own Zoom setting with the same three options. Set it there too if you use that section.

How to turn on Shopify image zoom in Horizon

Horizon has one checkbox, Enable zoom, in the Product media block. It is on by default (Horizon 4.5.0, as of November 2026).

Steps in Horizon

  1. Go to Online Store, then Themes, and click Customize.
  2. Choose Products, then Default product, in the top drop-down.
  3. In the Product information section, click the Product media block.
  4. Under Media, tick Enable zoom.
  5. Click Save.
Shopify image zoom in Horizon: the Enable zoom checkbox in the Product media block
Horizon: one checkbox in the Product media block turns zoom on or off.

What Horizon’s zoom does

When a shopper clicks a photo, Horizon opens a full-screen view with all product photos and small thumbnails. On a computer, each photo is shown large, and Horizon loads a bigger version of it (up to 3840 pixels wide). On a phone, shoppers can pinch or double-tap to zoom in, up to five times the normal size.

What Horizon does not have is zoom on hover. There is no setting for it. If you want the photo to magnify as the mouse moves over it, you need a little code, which I give you below.

Dawn vs Horizon: product image zoom compared

Here is how the built-in product image zoom works in the two free themes. For a wider comparison of the two themes, see my Dawn vs Horizon guide.

FeatureDawnHorizon
Setting nameZoom (drop-down)Enable zoom (checkbox)
WhereProduct information sectionProduct media block
Full-screen viewYes (Open lightbox)Yes
Hover zoomYes, 2x after a clickNo (code below)
On phonesLightbox, drag to lookPinch, up to 5x

How to add zoom on hover to Horizon (free, tested code)

You can add true zoom on hover to Horizon with one Custom Liquid block. When the mouse moves over a product photo, a sharp, magnified view appears inside the photo frame and follows the pointer. A click still opens Horizon’s full-screen zoom, so nothing you already have breaks.

Before you add it

  • Keep Enable zoom ticked. The code only runs on photos where Horizon’s zoom is on.
  • Work on a copy of your theme first. In Themes, click the three dots next to your theme and choose Duplicate.
  • The code only works on computers with a mouse, on screens at least 750 pixels wide. Phones keep Horizon’s pinch zoom.

Steps

  1. Open the theme editor and choose Products, then Default product.
  2. In the Product information section, click Add block.
  3. Choose Custom Liquid.
  4. Paste the code below into the Liquid code box.
  5. Click Save, then open a product on your live store and move your mouse over the main photo.
<style>
  .zm-lens {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    background-color: var(--color-background, #fff);
    background-repeat: no-repeat;
    border-radius: var(--media-radius, 0);
  }
  .zm-on .zm-lens { opacity: 1; }
</style>
<script>
  (function () {
    var ZOOM = 2;
    var desktop = window.matchMedia('(hover: hover) and (pointer: fine) and (min-width: 750px)');
    if (!desktop.matches) return;
    function setup(box) {
      if (box.dataset.zm) return;
      var img = box.querySelector('img.product-media__image');
      if (!img) return;
      box.dataset.zm = '1';
      var lens = document.createElement('span');
      lens.className = 'zm-lens';
      lens.setAttribute('aria-hidden', 'true');
      box.appendChild(lens);
      var inside = false;
      var ratio = 1;
      function show() {
        var r = box.getBoundingClientRect();
        var w = ZOOM * Math.max(r.width, r.height * ratio);
        lens.style.backgroundSize = w + 'px ' + w / ratio + 'px';
        box.classList.add('zm-on');
      }
      box.addEventListener('mouseenter', function () {
        inside = true;
        var src = img.getAttribute('data_max_resolution') || img.currentSrc || img.src;
        if (lens.dataset.src === src) return show();
        var big = new Image();
        big.onload = function () {
          ratio = big.naturalWidth / big.naturalHeight;
          lens.dataset.src = src;
          lens.style.backgroundImage = 'url("' + src + '")';
          if (inside) show();
        };
        big.src = src;
      });
      box.addEventListener('mousemove', function (e) {
        var r = box.getBoundingClientRect();
        var x = ((e.clientX - r.left) / r.width) * 100;
        var y = ((e.clientY - r.top) / r.height) * 100;
        lens.style.backgroundPosition = x + '% ' + y + '%';
      });
      box.addEventListener('mouseleave', function () {
        inside = false;
        box.classList.remove('zm-on');
      });
    }
    function scan() {
      document.querySelectorAll('.product-media-container--image').forEach(function (box) {
        if (box.querySelector('.product-media-container__zoom-button')) setup(box);
      });
    }
    var queued = false;
    new MutationObserver(function () {
      if (queued) return;
      queued = true;
      requestAnimationFrame(function () { queued = false; scan(); });
    }).observe(document.documentElement, { childList: true, subtree: true });
    scan();
  })();
</script>

How it works and how I tested it

The code waits until the large version of the photo has loaded, so shoppers never see a blank box. It uses the same large photo that Horizon loads for its full-screen view. When a shopper picks another variant and the photos change, the code picks up the new photos too.

I tested it with Horizon’s real styles and photo layout at 1280, 390 and 360 pixels wide. On the computer size, hover zoom worked, the click still opened the full-screen view, and nothing spilled outside the photo frame. On both phone sizes, the code did nothing, with no sideways scrolling. Pasted into Dawn, it stays switched off, because Dawn uses different class names.

Want a stronger zoom? In the line var ZOOM = 2, change the 2 to a 3. To remove the effect, delete the Custom Liquid block. For more free, tested tweaks like this one, browse my Shopify code snippets library.

Shopify image zoom on hover on a computer, and pinch zoom on a phone, in Dawn and Horizon
How each theme zooms: hover zoom on a computer, full-screen view and pinch zoom on a phone.

Best image size for Shopify image zoom

For sharp zoom, upload square product photos of at least 2048 x 2048 pixels. Shopify’s help center says this size “usually displays best” for square product images.

Zoom can only show the detail that is in your file. Shopify never makes a photo larger than the size you uploaded. So if you upload an 800-pixel photo, the zoomed view stretches those 800 pixels, and it looks soft. Here is what the themes ask for:

  • Dawn hover zoom uses a version of your photo up to 1946 pixels wide and doubles it on screen.
  • Dawn’s lightbox and Horizon’s full-screen view can load much larger versions on big screens.
  • Shopify’s limits: up to 5000 x 5000 pixels (25 megapixels), and under 20 MB per file, as listed on Shopify’s product media page.

My advice: 2048 x 2048 pixels covers most stores. For jewelry, watches or fabric, where shoppers want fine detail, I go a bit larger. Keep the same shape for every photo of a product, so the gallery doesn’t jump in height. My Shopify image sizes cheat sheet lists the right size for every other image on your store. Need to fix a photo’s size? My free Shopify image resizer does it in your browser.

Product image zoom with an 800 pixel photo compared to a 2048 pixel photo
The same zoom, two uploads: a small file looks soft, a 2048-pixel file stays sharp.

Why zoom on hover isn’t working: 6 common problems

When zoom on hover seems broken, the cause is almost always one of these six things. Check them in this order.

1. Dawn needs a click first

With Click and hover, nothing happens when the mouse only moves over the photo. The shopper must click once. This is how Dawn is built, not a bug. If you want zoom with no click in Dawn, that needs a theme code change or an app.

2. You changed a different product template

Each product template has its own setting. If some products use a second template, such as product.alternate, your change on Default product doesn’t reach them. Open the product in your admin, check Theme template, then set zoom on that template too.

3. You are testing on a phone or tablet

Touch screens have no mouse, so there is nothing to hover with. In Dawn, a tap opens the lightbox. In Horizon, a tap opens the full-screen view, where shoppers can pinch to zoom. Test hover zoom on a computer.

4. The photo is too small, so zoom looks blurry

If the zoomed photo looks soft, your upload is too small. Replace it with a 2048-pixel version. Drag the new photo into the same spot in the product’s media list, then delete the old one.

5. The zoom setting is off, or you are in the wrong theme

Check that Dawn’s Zoom isn’t set to No zoom, and that Horizon’s Enable zoom is ticked. Also check which theme you edited. Changes to an unpublished copy don’t show on your live store until you publish it. If you recently moved themes, my guide on how to change your Shopify theme covers what carries over.

6. The media is a video or a 3D model

Zoom only works on photos. Videos play, and 3D models turn, but neither zooms. If your first media is a video, shoppers need to swipe to a photo first.

Which way should you use?

Use the built-in zoom first. It is free, fast and kept up to date by Shopify. Here is how I choose on client stores:

  • Most Dawn stores: keep Open lightbox. It works the same on phones and computers.
  • Dawn stores with detailed products, like jewelry or prints: switch to Click and hover. Phone shoppers still get the lightbox.
  • Horizon stores: keep Enable zoom on. Add my hover code only if your shoppers mostly buy on computers and need to see fine detail.
  • Need a magnifier lens, a side-by-side zoom window or zoom on collection pages? That is when a product image zoom app makes sense. Check its reviews, and test your page speed after you install it.

Whichever you pick, sharp photos matter more than the zoom type. A great zoom on a blurry photo still looks bad. For more product page fixes, see my list of common Shopify store design mistakes.

Frequently asked questions

How do I add image zoom on hover in Shopify?

In Dawn, set Zoom to Click and hover in the Product information section. Shoppers click once, then move the mouse. Horizon has no hover setting, so add the free Custom Liquid code from this guide.

Does Shopify have built-in product image zoom?

Yes. Dawn has a Zoom setting with Open lightbox, Click and hover and No zoom. Horizon has an Enable zoom checkbox in the Product media block. Many other themes have zoom too, so check your theme’s settings.

Why are my Shopify product images blurry when I zoom?

The uploaded photo is too small. Shopify never enlarges a photo past its original size, so zoom stretches the pixels you have. Upload square photos of at least 2048 x 2048 pixels.

What is the best image size for Shopify image zoom?

2048 x 2048 pixels for square photos, which is the size Shopify recommends. The maximum is 5000 x 5000 pixels (25 megapixels), and each file must be under 20 MB.

Does Shopify image zoom work on mobile?

Yes, but not as hover zoom. In Dawn, a tap opens a lightbox with a large photo that shoppers can drag around. In Horizon, a tap opens a full-screen view where shoppers pinch or double-tap to zoom up to five times.

Do I need a product image zoom app?

Usually not. The built-in zoom in Dawn and Horizon covers most stores. An app makes sense if you want a magnifier lens, a side zoom window or zoom outside the product page.

Sharp photos and a working zoom give shoppers the close look they need before they buy. If you want your product pages set up and tested for you, take a look at my Shopify store redesign service, or Message me on WhatsApp and I will take a look.

Zobaer Hossain, Shopify designer

Written by Zobaer H.

Shopify Select Partner with 10+ years of experience and 5,000+ clients. I design and build Shopify stores, and I write these guides from real client work.

Shopify Select Partner badge

In this guide

    ★★★★★ 4.9 from 1,350+ client reviews

    Let's start

    Ready to start your store?

    Send me your idea or store link. I'll reply with honest advice and a fixed quote.

    ✓ Free quote✓ Fixed price✓ You own everything