5

I have installed Media entity image Module with Lightning Distribution. I can embed image through CKEditor. But how can I select image-styles for Image witch has embed.

Embedded code in CKEditor

<drupal-entity data-embed-button="media_browser" data-entity-embed-display="view_mode:media.embedded" data-entity-type="media" data-entity-uuid="869dbc6e-de17-4051-8945-e7acd3237c73"></drupal-entity>

Rendered in html

<article class="embedded-entity">
  <article data-quickedit-entity-id="media/36" class="media media-image view-mode-embedded" data-quickedit-entity-instance-id="0">
    <div data-quickedit-field-id="media/36/image/ja/embedded" class="field field--name-image field--type-image field--label-hidden field--item">
      <img src="/sites/default/files/images/soap-bubble-1958841_1920.jpg" width="1920" height="1280" alt="" typeof="foaf:Image" class="img-responsive">
    </div>   
  </article>
</article>

3 Answers 3

3

I found solution for my self.

  1. Move to /admin/config/content/embed/button/manage/media_browser
  2. Check to Thumbnail in Allowed Entity Embed Display plugins section.
  3. In node editing select 'Display as Thumbnail' and you could select Image style.

Check to 'Thumbnail' in Allowed Entity Embed Display plugins section

In node editing select 'Display as Thumbnail' and you could select Image style

1
  • That path doesn't seem to work (Move to /admin/config/content/embed/button/manage/media_browser ) Apr 29, 2020 at 3:12
2

As of 2.1.6 (8.x-2.1.6) Lightning provides an additional embed plugin for images embedded via CKEditor that allows editors to select an image style, alt text, and other settings each time an image is embedded.

By default, the option to select which plugin is used is hidden and the Media image plugin is automatically selected if the media is an image. You can allow editors to override the default via config.

More information available on the Lightning Blog and in the 2.1.6 Release Notes.

New embed plugin, used by default for image media:
Lightning Embed dialog for images

Compare to standard embed plugin - still used by other media types: Standard Embed dialog

1

Check out the Responsive Image module, as recommend here

Similar question with a well-accepted answer is: How to set Media Styles in Media 7.1.2 / Media 7.2.X?

Hope that is able to help you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.