This module https://www.drupal.org/project/inline_responsive_images adds "data-responsive-image-style" attribute to inline images and provides way to choose from responsive image styles available.

Comments

birdsnbees created an issue. See original summary.

  • arpeggio committed 8944b29 on 8.x-1.x
    Issue #2794367 by arpeggio: Integrated "Inline responsive images" module...
arpeggio’s picture

Status: Active » Fixed

I have implemented this as follows:

  • Made inline_responsive_images module as not required but optional. If this module is not installed, no "data-responsive-image-style" attribute will be added to inline images.
  • The first responsive image style in the enabled responsive styles list that are available in the editor will be used as initial or default value for "data-responsive-image-style" attribute of inline images. Example if the list are:
    Narrow
    Wide
    ... since "Narrow" is first in the list, its machine name "narrow" will be the initial value of "data-responsive-image-style" attribute of inline images that are uploaded via drag and drop or pasted from clipboard. Anyway, responsive image style can be changed by double clicking the image.
    You may want to check this article: https://www.webfoobar.com/node/86 as your guide to create your own responsive image style.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.