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 7940214eec
commit 2023f4c2f2

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 %}