Problem/Motivation
We notice there are 4 data attributes used by entity_embed which are not used anymore in drupal media tag.
Steps to reproduce
- Insert a media by using entity_embed via entity_browser with all options used, and find source code as
<drupal-entity alt="Termperature Icon" data-align="left" data-caption="test" data-embed-button="media_browser" data-entity-embed-display="media_image" data-entity-embed-display-settings="{"image_style":"","image_link":"file"}" data-entity-type="media" data-entity-uuid="42aee921-5348-4c64-bb23-e04721660d96" title="Termperature Icon"></drupal-entity>
- Insert a media by using entity_embed via entity_browser with all options used, and find source code as
<drupal-media alt="test" data-align="left" data-caption="test" data-entity-type="media" data-entity-uuid="42aee921-5348-4c64-bb23-e04721660d96"></drupal-media>
- Install the module convert_entity_media_embed
- Run cron job
- Check the source code of the media tag
<drupal-media alt="Termperature Icon" data-align="left" data-caption="test" data-embed-button="media_browser" data-entity-embed-display="media_image" data-entity-embed-display-settings="{"image_style":"","image_link":"file"}" data-entity-type="media" data-entity-uuid="42aee921-5348-4c64-bb23-e04721660d96" title="Termperature Icon"></drupal-media>
As you can see the following data attributes are not used but still present in the source code
- data-embed-button="media_browser"
- data-entity-embed-display="media_image"
- data-entity-embed-display-settings="{"image_style":"","image_link":""}"
- title="Termperature Icon"
Proposed resolution
1. remove unused data attributes
2. migrate data attributes of style to data-view-mode
Regarding the second point, it also requires one to one match from old style to new view mode in the media image.
Remaining tasks
TBD
User interface changes
N/A
API changes
N/A
Data model changes
N/A