aboutsummaryrefslogtreecommitdiff
path: root/templates/shortcodes/image.html
blob: 4f9d3de3ecf2d6e2eb1cbc5ee9ac4a3d13274e37 (plain)
1
2
3
4
5
6
7
<picture>
  {% for source in sources -%}
    {% set type = source | split(pat=".") | last -%}
    <source srcset="{{ config.base_url | safe}}{{ page.path | safe }}{{ source | safe }}" type="{{ 'img/' ~ type }}" />
  {% endfor -%}
  <img src="{{ fpath }}" alt="{{ falt | default(value='Image') }}"{% if fw %} width="{{fw}}"{% endif %}{% if fh %} height="{{fh}}"{% endif %} loading="lazy" />
</picture>