I have overridden a Twig template for an image field, which uses Image URL Formatter in order to remove the surrounding Div's.
Here is my Twig template for the field (field--media--field-image--image.twig.html):
{% for item in items %} {{ item.content }} {% if loop.length > 1 and not loop.last %} {{ ', ' }} {% endif %} {% endfor %} The field is output to the src tag in the Twig template for my Media Bundle (media--image.twig.html):
<div class="allstar-image-wrap"> {% if href is not empty %} <a {{ href }} {{ target }}> {% endif %} <img src="{{ content.field_image }}" {{ alt }} {{ title }} /> {% if href is not empty %} </a> {% endif %} </div> However, the twig debug information outputs as part of the image URL:
Is there any way to turn off twig debug for a specific template? Or any other way around this?
