- Status changed to Needs work
over 1 year ago 12:07am 17 January 2023 - @rang501 opened merge request.
- Status changed to Needs review
over 1 year 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...
-
ytsurk β
committed e58d1f9d on 2.1.x
Issue #3322824 by rang501, Raphael Apard: Alt attribute lost when using...
-
ytsurk β
committed e58d1f9d on 2.1.x
- π«π·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 ).