feat: Added support for svg images to flow_block_page template.

This commit is contained in:
muli 2022-10-25 14:18:32 +02:00
parent 75062f706e
commit 1c99869c84

View File

@ -27,7 +27,11 @@
{% if this.attachments.images %}
<div class="content__inner_half_box">
{% for image in this.attachments.images %}
{% if image.format != 'svg' %}
<img class="content__half_box_image" src="{{ image|url }}" width="{{ image.width / 2 }}" alt="{{ image.description }}" srcset="{{ image.thumbnail(image.width / 2)|url }} 1x, {{ image|url }} 2x">
{% else %}
<img class="content__half_box_image" src="{{ image|url }}" width="100%" alt="{{ image.description }}">
{% endif %}
{% endfor %}
</div>
{% endif %}