Simple Inline Responsive Images
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Component created
Component changed
Component body
Provides a filter to render inline images through a responsive image style.
This module was originally constructed from code within a core patch in #2061377: Allow image style to be selected in Text Editor's image dialog (necessary for structured content), specifically the patch from #198. Endless thanks to everyone who has contributed to that issue thus far, including Wim Leers, Jelle_S, attiks, and mdrummond.
This module was created from that patch to satisfy the immediate needs of a client and to include one key difference. That difference is that all inline images will be rendered through the same responsive image style, rather than allowing the user to select a separate image style on every inline image. This satisfies the needs of the client while keeping the editorial UI and this module's code as simple as possible.
Installation and configuration
- Install as you would normally install a contributed Drupal module.
- Navigate to the "Text formats and editors" configuration page.
- Click "Configure" next to the text format that should render inline images through a responsive image style.
- Enable the "Display responsive image styles" filter under "Enabled filters".
- Under "Filter processing order", ensure the filter comes after other image filters, such as those for alignment and captions.
- Under filter settings for the newly enabled filter, select the responsive image style that all inline images should be rendered with.
- Click "Save configuration" and repeat for any other text formats needed.
