- Issue created by @thomas.frobieter
Possibly a duplicate of 📌 Feedbacks about SDC components Active .
Okay, there is a possible solution in 🐛 Inconsistent `attributes` handling Active : https://www.drupal.org/project/radix/issues/3482516#comment-15838105 🐛 Inconsistent `attributes` handling Active
Changes were made, but then removed in later iterations? https://git.drupalcode.org/project/radix/-/commit/ae826d7d29215d9d00fe3619d8af2c50da8407e4#cadf8086764711dda116d902e75dc698eaa4ed1e- 🇮🇳India anirudhsingh19
@thomas.frobieter I got the answer why it was fixed and later removed. Seems like it was done for backward compatibility. See: https://www.drupal.org/project/radix/issues/3498545 🐛 Images are broken since 6.0.0-rc7 (only none responsive images) Active .
But, I think its still problematic cause our img tag has got classes like card and border-0, which may lead to unexpected behaviour.
- 🇮🇳India anirudhsingh19
Even if there is no fix for this currently, then too I think instead of doing this in image.twig:
- {% set image_attributes = attributes ?: (image_attributes ?: create_attribute()) %}We do this:
+ {% set image_attributes = image_attributes ?: create_attribute() %}
+ {% set image_attributes = attributes ? image_attributes.merge(attributes) : image_attributes %}So that atleast we can get the image_attributes too. Because currently they get overridden by attributes.