Is it possible to change the Alt value inside the image.html.twig template? Is it possible to change the alt value inside the image.html.twig template?
I found out that it can be accessed via attributes.alt. And then there is a protected value. Is there a way to set it?
Something like:
{% set attributes.alt.value = 'new alt' %}
In a Twig template you can use the method attributes.setAttribute():
{% set attributes = attributes.setAttribute('alt', 'new alt') %}