alexohneander-zola/templates/shortcodes/invertible_image.html

3 lines
307 B
HTML

{% set meta = get_image_metadata(path=src, allow_missing=true) %}
<img class="invertible-image" {% 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 %}/>