HTML Filters

HTML filters wrap assets in HTML tags.

In this article:


Generates an image tag.

{{ 'duck.png' | asset_url | img_tag }} img_tag accepts parameters to output an alt tag and class names. The first parameter is output as the alt text, and any other following parameters are output as CSS classes.

{{ 'duck.png' | asset_url | img_tag: 'A Very Eloquent Duck', 'img-responsive duck' }}


Generates a script tag.

{{ 'script.js' | asset_url | script_tag }}


Generates a stylesheet tag.

{{ 'styles.css' | asset_url | stylesheet_tag }}

Contact support or access our 24/7 Live Chat:

Contact Support Live Chat

Need Help? Live Chat with Us.