All guides

Guide

Shopify Liquid Cheat Sheet 2026

Shopify Filters (URLs, HTML, Money and More)

Shopify adds its own filters on top of standard Liquid. Items marked with an asterisk in older cheat sheets only work on tag-filtered collection or blog pages.

01

asset_url

Returns the CDN URL of a file in the theme's assets folder.

{{ 'theme.css' | asset_url | stylesheet_tag }}
02

camelize

Converts a string to CamelCase.

{{ 'variant-title' | camelize }}  → VariantTitle
03

capitalize

Capitalizes the first character of a string.

{{ 'summer sale' | capitalize }}
04

default_pagination

Outputs ready-made pagination links. Use inside a paginate block.

{{ paginate | default_pagination: next: 'Next', previous: 'Prev' }}
05

global_asset_url

Legacy

Returns the URL of a Shopify-hosted global asset. Rarely needed in modern themes.

{{ 'lightbox.js' | global_asset_url | script_tag }}
06

handleize (handle)

Converts a string into a handle.

{{ 'Summer Sale!' | handleize }}  → summer-sale
07

img_tag → use image_tag

Legacy

Use image_url with image_tag, which outputs responsive srcset, width and height attributes automatically.

{% comment %} Current {% endcomment %}
{{ product.featured_image | image_url: width: 800 | image_tag: loading: 'lazy' }}
14

highlight_active_tag*

Wraps a tag in <span class="active"> when it is currently applied.

{{ tag | highlight_active_tag | link_to_tag: tag }}
15

money

Formats a price using the store's money format. Prices in Liquid are in cents (subunits), so always apply a money filter.

{{ product.price | money }}  → $19.99
16

money_with_currency

Formats a price with the currency code.

{{ product.price | money_with_currency }}  → $19.99 USD
17

money_without_currency

Formats a price as a number without a currency symbol.

{{ product.price | money_without_currency }}  → 19.99
18

pluralize

Picks the singular or plural word based on a number.

{{ cart.item_count }} {{ cart.item_count | pluralize: 'item', 'items' }}
19

product_img_url → use image_url

Legacy

Deprecated, along with img_url. Use image_url with a width or height parameter.

{{ product.featured_image | image_url: width: 600 }}
20

sort_by

Adds a sort parameter to a collection URL.

{{ collection.url | sort_by: 'price-ascending' }}
21

script_tag

Outputs a <script> tag. It is render-blocking, so for performance prefer a manual <script src="…" defer>.

<script src="{{ 'app.js' | asset_url }}" defer></script>
22

stylesheet_tag

Outputs a <link rel="stylesheet"> tag for a URL.

{{ 'theme.css' | asset_url | stylesheet_tag }}
23

url_for_type

Returns the URL of a product type's collection page.

{{ 'Shirts' | url_for_type }}
24

url_for_vendor

Returns the URL of a vendor's collection page.

{{ 'Acme' | url_for_vendor }}
25

weight_with_unit

Formats a weight (stored in grams) using the store's weight unit.

{{ variant.weight | weight_with_unit }}
26

within

Scopes a product URL to a collection, producing /collections/…/products/…. These URLs duplicate the canonical product URL, so many SEO-focused themes avoid them.

{{ product.url | within: collection }}

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