svg-image-field-formatter.html.twig in SVG Image Field 2.1.x
{% if link_url %}
<a href="{{ link_url }}">
{% endif %}
{% if inline %}
{{ svg_data|raw }}
{% else %}
<img{{ attributes }} src="{{ file_url(uri) }}" />
{% endif %}
{% if link_url %}
</a>
{% endif %}
File
templates/svg-image-field-formatter.html.twig
View source
- {% if link_url %}
- <a href="{{ link_url }}">
- {% endif %}
- {% if inline %}
- {{ svg_data|raw }}
- {% else %}
- <img{{ attributes }} src="{{ file_url(uri) }}" />
- {% endif %}
- {% if link_url %}
- </a>
- {% endif %}