img_tag
Returns an HTML image tag. You can pass a string or a series of key:value
arguments to set HTML attributes.
Input:
{{ "path-to-image.jpg" | img_tag }}
{{ "path-to-image.jpg" | img_tag: class: "image-class", alt: "image-alt" }}
Output:
<img src="path-to-image.jpg">
<img src="path-to-image.jpg" class="image-class" alt="image-alt">