Filters transform values: {{ product.price | money }}. Click any filter for syntax, parameters, and example output.
Money
| Filter | Description |
|---|
image_url | Returns a CDN URL for an image, resized and optimized on the fly. Requires width or height. |
image_tag | Renders a complete element (srcset, sizes, alt, lazy-loading) from an image URL. |
media_tag | Renders any media object: image, adaptive-streaming video player, or interactive 3D/AR viewer. |
video_tag | Renders a |
preload_tag | Emits for a resource URL — use on the LCP hero image. |
payment_type_img_url | URL of the icon for a payment type. |
payment_type_svg_tag | Inline SVG tag for a payment type icon. |
Colors
Fonts
URLs & links
Strings & data
| Filter | Description |
|---|
t | Translates a key from the theme’s locales/ files. Supports interpolation and counts. |
translate | Alias of t. |
json | Serializes any value or object to JSON. |
api_json | Serializes drops into the storefront-API JSON shape — for passing data to JavaScript. |
structured_data | JSON-LD structured data (Product, Article…) for rich search results. |
format_address | Locale-aware HTML for a postal address. |
date | Formats a date with strftime patterns or named formats; locale-aware. |
time_tag | Semantic |
pluralize | Chooses singular or plural based on a count. |
camelize | Converts a string to CamelCase. |
highlight | Wraps occurrences of the search terms in . |
base64_url_safe_encode | URL-safe Base64 encode. |
base64_url_safe_decode | URL-safe Base64 decode. |
blake3 | BLAKE3 hash of a string (hex). |
default | Fallback when a value is nil, false, or empty. |
default_pagination | Renders prev/next page controls for a paginate block. |
sort_by | Appends a sort_by parameter to a collection URL. |
within | Scopes a product URL to a collection for collection-aware navigation. |
Commerce
| Filter | Description |
|---|
product_inventory_json | Per-variant live inventory payload used by themes for client-side availability. |
payment_button | Renders the dynamic checkout button for the current product form. |
payment_terms | Renders payment terms/installments messaging when available. |
avatar | Avatar element (initials) for a customer. |
editor_setting | Theme-editor binding attribute so a setting becomes click-to-edit in the visual editor. No output on the live store. |
Standard
| Filter | Description |
|---|
abs | Absolute value. |
append | Appends a string. |
at_least | Clamps a number to a minimum. |
at_most | Clamps a number to a maximum. |
capitalize | Uppercases the first character. |
ceil | Rounds up. |
compact | Removes nil values from an array. |
concat | Concatenates two arrays. |
divided_by | Division. |
downcase | Lowercases a string. |
escape | HTML-escapes a string. |
escape_once | HTML-escapes without double-escaping entities. |
first | First element of an array. |
floor | Rounds down. |
join | Joins array elements with a separator. |
last | Last element of an array. |
lstrip | Strips leading whitespace. |
map | Plucks a property from each element. |
minus | Subtraction. |
modulo | Remainder. |
newline_to_br | Converts newlines to . |
plus | Addition. |
prepend | Prepends a string. |
remove | Removes every occurrence of a substring. |
remove_first | Removes the first occurrence of a substring. |
replace | Replaces every occurrence. |
replace_first | Replaces the first occurrence. |
reverse | Reverses an array. |
round | Rounds to the nearest integer or given decimals. |
rstrip | Strips trailing whitespace. |
size | Length of a string or array. |
slice | Substring/sub-array by offset and length. |
sort | Sorts an array (case-sensitive); pass a property to sort objects. |
sort_natural | Case-insensitive sort. |
split | Splits a string into an array. |
strip | Strips surrounding whitespace. |
strip_html | Removes HTML tags. |
strip_newlines | Removes newline characters. |
sum | Sums array values; pass a property name for objects. |
times | Multiplication. |
truncate | Truncates to a length with an ellipsis. |
truncatewords | Truncates to a word count. |
uniq | Removes duplicates. |
upcase | Uppercases a string. |
url_decode | Decodes percent-encoding. |
url_encode | Percent-encodes for URLs (spaces become +). |
where | Filters an array of objects by property value. |