All guides

Guide

Shopify Liquid Cheat Sheet 2026

Image Object

Returned by product.images, product.featured_image, variant.image and similar.

01

image.id / image.product_id / image.position

The image ID, its product's ID, and its position in the product's image list.

{{ image.position }}
02

image.src

The image's relative path. Pass the image to image_url instead of building URLs from src.

{{ image | image_url: width: 800 }}
03

image.alt

The alt text — always output it for accessibility and SEO.

{{ image | image_url: width: 800 | image_tag: alt: image.alt }}
04

image.width / height / aspect_ratio

Dimensions — use them to reserve space and prevent layout shift.

style="aspect-ratio: {{ image.aspect_ratio }}"

Shopify experts

Let's talk ecommerce, Shopify & Shopify Plus solutions.

DROPSHIP HUBS helps ecommerce brands build, improve, and grow Shopify stores. We support new builds, migrations, ongoing development, SEO, and conversion optimisation.

Our team can help plan the right approach based on your store, goals, and current challenges.

Get in touch