- πͺπͺEstonia egontinno
Here is patch for Drupal 10.3
Previous ones didn't applied any more.
While tried to render a referenced image media field I noticed that the source code does not contain the title attribute on the image tag even if we require the title to be filled up on media creation.
After digging in the code I've found out that the Thumbnail formatter using the `$media->get('thumbnail')->first()` code to fetch the image, and not the original field. After further investigation, I've found that the Drupal\media\Plugin\media\Source\Image::getMetadata place just the alt text is set, while the title is totally missing.
1. Create media with an image field (require alt and title).
2. Create a content type and attach this previously created media as a reference field.
3. In the same content type, set the field formatter to Thumbnail.
4. Create content with this content type.
5. View the source of it, and you will see there's no title just alt.
Needs to be fixed so the title attribute is rendered.
- Create a hook_update (?) to update all the existing image entity.
- Test.
-
-
-
-
Active
11.0 π₯
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Here is patch for Drupal 10.3
Previous ones didn't applied any more.