voyage_velo/templates/shortcodes/image.html

17 lines
486 B
HTML
Raw Permalink Normal View History

2023-07-20 19:45:55 +02:00
{% for asset in page.assets -%}
{%- if asset is matching(name) -%}
{% set image = resize_image(path=asset, height=size, op="fit_height") %}
<figure>
{% set full_image = resize_image(path=asset, width=1024, height=1024, op="fit") %}
<a href="{{ full_image.url }}" target="_blank">
<img src="{{ image.url }}">
</a>
{% if caption %}
<figcaption>
{{ caption }}
</figcaption>
{% endif %}
</figure>
{% endif %}
{% endfor %}