core/modules/system/templates/image.html.twig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/modules/system/templates/image.html.twig b/core/modules/system/templates/image.html.twig
index 8c1e447..4ca403f 100644
--- a/core/modules/system/templates/image.html.twig
+++ b/core/modules/system/templates/image.html.twig
@@ -58,7 +58,7 @@
already specifically defined.
#}
{% for attribute_name in ['width', 'height', 'alt', 'title', 'sizes'] %}
- {% if _context[attribute_name] is defined and attributes[attribute_name] is not empty %}
+ {% if _context[attribute_name] is defined and attributes[attribute_name] is empty %}
{% set attributes = attributes.setAttribute(attribute_name, _context[attribute_name]) %}
{% endif %}
{% endfor %}