Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am not sure how to handle the output of media image.
I would like to have a documentation howto do this in best practice.
I should probably choose an entity reference view mode to output the images.
Can the alt and title be set by a separate field in the media image entity or can the alt and title attributes of the image field inherit a custom field of the entity, e.g. if I create a field "description", can this be used as alt and title field?
Comments
Comment #2
demonde CreditAttribution: demonde commentedComment #3
demonde CreditAttribution: demonde commentedMy question is related to a missing formatter: https://www.drupal.org/node/2850169
Comment #4
demonde CreditAttribution: demonde commentedComment #5
demonde CreditAttribution: demonde commentedThe problem is pretty well handled by file entity, where there is an image formatter which allows to specify a field as "Image title field" and "Image alt field". This solution is needed for Media entity image.