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

demonde created an issue. See original summary.

demonde’s picture

Issue summary: View changes
demonde’s picture

My question is related to a missing formatter: https://www.drupal.org/node/2850169

demonde’s picture

demonde’s picture

The 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.