Possible to turn off Twig debug mode for a specific template? 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 &gt; 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):

&lt;div class="allstar-image-wrap"&gt;
    {% if href is not empty %}
        &lt;a {{ href }} {{ target }}&gt;
    {% endif %}
        &lt;img src="{{ content.field_image }}" {{ alt }} {{ title }} /&gt;
    {% if href is not empty %}
        &lt;/a&gt;
    {% endif %}
&lt;/div&gt;


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?
There is also this alternative found here and here where you can do something like this using the triple filter |render|striptags|trim :

&lt;img src="{{ url_image }}" alt="{{ title|render|striptags|trim }}" /&gt;


It worked perfectly in my case (|escape didn't work)