{% image 'images/image_path.png' %}
#=> <img src="//site_root/images/image_path.png" />
{% image object %}
#=> <img src="//site_root/photos/photo_path.jpg" srcset="..." sizes="..." />
title
: the title for the image.height
: the height of the imagewidth
: the width of the imageclass
: the "class" attribute for the image tagloading
: to add lazy-loading ("lazy", "eager" etc.). Defaults to nilstyle
: the "style" attribute of the image tagdata-*
or data_*
: data attributessizes
: user-defined sizes attributesrcset
: user-defined srcset attribute (either as a string or an array)with_srcset
: true or false, defaults to true. If the user uses an object for generating the image tag and doesn't want the srcset to be automatically generated, this can be given a value of false.target_width
: user-defined target width for an image (e.g. if the image doesn't need to be wider than a certain value){% image 'image_path.png' alt="Image" class="my-class" data-style="beautiful" %}
#=> <img src="/site_root/image_path.png" alt="Image" class="my-class" data-style="beautiful" />