Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). Varbase Media Header 9.2.1 Minor update available for module varbase_media_header (9.2.1). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module automatically applies Drupal image styles to images inserted directly into text editor content, ensuring consistency and optimization. It works with various editors and can be configured to use specific image styles for inline and background images.

Editor Image Styles automatically applies Drupal image styles to inline images and background images in text editor content.
It helps site builders ensure images added through editors like CKEditor 5 and Gutenberg are optimized and consistently styled.

Features

  • Applies Drupal image styles to inline <img> tags and CSS background-image URLs.
  • Configurable image style selection (e.g., thumbnail, large, custom).
  • Supports a base path setting to detect images in content.
  • Optional support for background images.
  • Works with any filter-enabled editor such as CKEditor 5 and Gutenberg.

This module is useful when editors insert images directly in text areas but you still want those images delivered through Drupal’s image style system for better performance and design consistency.

Post-Installation

  1. Go to Configuration → Content Authoring → Editor Image Styles and select your preferred settings.
  2. Navigate to Configuration → Content Authoring → Text formats and editors.
  3. Edit the text format you want (e.g., Full HTML or Gutenberg).
  4. Enable the Editor Image Styles filter and place it in the correct filter order (after HTML filtering, before cache filters).

Once configured, images in your text editor content will automatically use the defined image style.

Additional Requirements

  • No additional modules beyond Drupal core are required.
  • Compatible with Drupal 10 and Drupal 11.

Similar projects

  • Filter module (core) – Provides generic filtering but does not support Drupal image styles in editor content.
  • Responsive Image (core) – Focused on <picture> elements and breakpoints, not inline or background images inside editors.

Editor Image Styles fills the gap by applying Drupal image styles directly to text editor content.

Supporting this Module

Development is community-driven. Feedback, contributions, and issue reports are welcome via the issue queue.

Community Documentation

Project page: Editor Image Styles on Drupal.org
Contributions, demos, and documentation can be shared through the issue queue.

Activity

Total releases
1
First release
Sep 2025
Latest release
9 months ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Slowing

Releases

Version Type Release date
1.0.x-dev Dev Sep 28, 2025