- Status changed to Needs work
almost 2 years ago 12:07am 17 January 2023 - @rang501 opened merge request.
- Status changed to Needs review
almost 2 years ago 8:42pm 26 February 2023 - 🇪🇪Estonia rang501 Viljandi
Yeah, my patch probably wasn't correct.
I opened MR for the changes that should find media alt text and also default to media name in case alt is not set.
It doesn't fix the issue with overriding alt text during embedding. There we have an issue where entity_embed module doesn't pass other attributes to formatter and we don't have any information about customized alt text.
- 🇫🇷France raphael apard
Hi,
Thanks for your work. I'm using this Field Formatter on en entity (not a CKEditor field) and alt attributes is missing too.
Why not get alt from thumbnail ?
https://git.drupalcode.org/project/media_directories/-/blob/2.1.x/module...
- 🇫🇷France raphael apard
I think this is safer to use the getSource method to get the source field instead of using
thumbnail
.
I my case, alt text is not updated onthumbnail
after editing the media.Here a patch for the 2.0.x version.
- 🇫🇷France raphael apard
Here a patch for the 2.1.x version (including this fix: https://www.drupal.org/project/media_directories/issues/3366407 🐛 MediaThumbnailFormatter::__construct() error Closed: won't fix ).