🐛 fix: handle missing image metadata gracefully

This commit is contained in:
welpo
2023-04-16 18:06:20 +02:00
parent be8ec45c35
commit b5b50cdefb
4 changed files with 5 additions and 5 deletions

View File

@@ -1,2 +1,2 @@
{% set meta = get_image_metadata(path=src) %}
{% set meta = get_image_metadata(path=src, allow_missing=true) %}
<img class="dimmable-image" src="{{ get_url(path=src) }}" {% if alt %}alt="{{ alt }}" {% endif %} {% if meta.width %}width="{{ meta.width }}" {% endif %} {% if meta.height %}height="{{ meta.height }}" {% endif %}/>