Similar question to How to set width to Media entity image in CKEditor BUT I am trying to do more than insert various sizes of images, I want to add classes to the actual img tag. So when I insert an image that I've already added to my media into ckeditor, it shows up as drupal-entity instead of img. Specifically:
<drupal-entity alt="test" data-embed-button="media_browser" data-entity-embed-display="media_image" data-entity-embed-display-settings="{"image_style":"","image_link":""}" data-entity-type="media" data-entity-uuid="9467197e-1088-45eb-bbf4-c3970d45fd6e" title="test" class="lightbox"></drupal-entity>
When I save the page it renders as something like
<article class="embedded-entity"><img src="/sites/default/files/2018-08-18%2019_42_02-Road%20Bike%20Cycling%2021%20Speed%2026%20Inch%20_%20700CC%20TX30%20BB8%20Double%20Disc%20Brake%20Non-Dampin.png" alt="test" title="test" typeof="foaf:Image" class="img-responsive" /></article>
If I add a class like lightbox or dropshadow to drupal-entity it gets applied to the article tag instead of the img tag. Any way to add classes to inserted images that live in the cool new media functionality? Seems like there are an endless number of use cases where adding classes to inserted images would be crucial.
Thanks to anyone who can help!