alexohneander-zola/templates/shortcodes/full_width_image.html
2023-07-05 02:43:07 +02:00

5 lines
314 B
HTML

{% set meta = get_image_metadata(path=src, allow_missing=true) %}
<div class="full-width">
<img {% if src %}src="{{ get_url(path=src) }}" {% endif %} {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>
</div>