Skip to main content
Use the 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.
Both filters accept a URL string, an image value, or a hash with a 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:
Each raw token must use ImageKit’s code-value form. Whitespace around commas is ignored. You can also use named parameters for common operations:
This produces the transformation 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-based tr: segment, the new transformation replaces it. Calling either filter without a valid transformation returns the resolved URL unchanged.

Replace Shopify size strings

The img_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.