inline_ asset_ content
asset_name | inline_asset_content
returns string
Outputs the content of an asset inline in the template. The asset must be either a SVG, JS, or CSS file.
Note
The asset size must be less than 15KB to be inlined.
{{ 'icon.svg' | inline_asset_content }}
{{ 'icon.svg' | inline_asset_content }}
Output
'<svg xmlns="http://www.w3.org/2000/svg"/>'
Was this page helpful?