Image Zoom
Hover-to-zoom image grid for editorial PDPs and detail shots.
Live preview
See it in action.
Fully interactive, drag, click, scroll inside the frame, toggle to mobile.
About this block
Magnify any image under the cursor on hover (or tap on touch devices). Transform-origin tracks the pointer so the zoom area follows you. No zoom library, no third-party SDK, just pure CSS transform plus a few lines of JS for pointer tracking.
Install in 90 seconds
- 01
Open your Shopify admin and go to Online Store โ Themes โ Customize.
- 02
On any template, click "Add section" where you want the block to appear.
- 03
Choose "Custom Liquid" from the section list.
- 04
Paste the code from this page into the Custom Liquid setting and click Save.
- 05
Edit text and colors directly in the code (look for the comments marking edit points).
The code
Paste the snippet below into the Custom Liquid setting on a Custom Liquid section in your Theme Editor. Edit text, colors, and links directly in the code, every editable spot is marked with an EDIT comment.
What you can customize
Custom Liquid sections don't expose theme-editor settings, so customization happens in the code. Here's what to edit:
| What | How to edit |
|---|---|
| Heading | Find the value in the code and change it directly. |
| Each figure | Replace each <img src=...> with your asset URL. Edit the figcaption text. |
| Zoom strength | Look for transform:scale(2.4). Higher numbers zoom more. |
SEO & accessibility notes
- Real <img> with loading="lazy" and alt attributes, fully crawlable for image SEO.
- Native <figure>/<figcaption> markup, semantic and screen-reader friendly.
- Falls back to tap-to-zoom on touch devices via matchMedia '(hover: hover)' detection.
- Uses transform-origin (CSS) plus pointer events, no JS animation library.
Related
