image_url filter to request an ImageKit rendition that fits your
layout. The img_url filter is a legacy alias with the same transformation
behavior.
url or
src key. They return an empty string for an empty input.
Choose a transformation syntax
Pass a comma-separated ImageKit transformation string when you need direct control:code-value form. Whitespace around commas
is ignored. You can also use named parameters for common operations:
w-600,h-400,q-80,f-auto. You can combine a raw string and named parameters:
crop accepts top, bottom, left, right, or center. It adds an
ImageKit focus token only when you also provide width or height.
For other operations, use the corresponding raw ImageKit token. See the
ImageKit transformation reference
for available codes and values.
Understand URL handling
The filters transform only URLs on Fluid’s configured ImageKit host. A third-party URL, including a URL from another ImageKit account, remains unchanged. If an ImageKit URL already contains a path-basedtr: segment, the new
transformation replaces it. Calling either filter without a valid
transformation returns the resolved URL unchanged.
Replace Shopify size strings
Theimg_url alias preserves Shopify-style size strings such as "800x800"
and "master" for compatibility. It does not convert them into ImageKit
transformations.
Replace those strings when you want Fluid to resize an image:
For responsive markup and sensible loading defaults, use the
media_tag filter. See the
theme developer guide for more Liquid examples.