Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Inline Image Saver [CKEditor]

Security covered Under active development 3 sites

This module ensures that images pasted into text fields are saved locally and properly referenced so they don't break. It can automatically download external images, validate their format, replace broken images with fallback content, and optionally log changes to revisions.

Prevents loss or breakage of (CKEditor) inline images in text fields by ensuring all images are stored locally and reference file entities. The module scans <img> tags in the markup, validates them, optionally downloads external images, and replaces broken images with fallback HTML markup. Useful when editors paste content with externally hosted or data: URI images.

Supporting this Module ☕

Found this module useful? Support via PayPal.

Features

  1. Image validation: Enforces strict rules on inline images in text fields. Ensures they reference actual file entities (data-entity-* attributes), and optionally verifies:
    • The referenced file exists on the filesystem
    • The MIME type is valid and supported
    • The image URL matches the expected file entity path (host, path, optional query)
  2. External image downloading: Downloads images that fail validation during save. Typical cases:
    • Images without data-entity-* attributes
    • Externally hosted images
    • data: URI images
  3. Prefer reuse of existing files: Reuses existing files when saving downloaded images with identical content. Supports integration with the File Hash module.
  4. Fallback HTML markup: Replaces broken or undownloadable images with configurable HTML markup. Supports token placeholders such as @src, @alt, and @title.
  5. Revision support: Automatically creates new revisions when replacing or downloading images, with a configurable revision log message.
  6. Text format targeting: Optionally restricts processing to specific text formats (e.g. "Full HTML", "Basic HTML").
  7. Sync-safe mode: Skips processing during programmatic entity synchronization (via SynchronizableInterface).

Use cases

  • Editors pasting content with externally hosted or data: URI images
  • Ensuring image files are safely stored and backed up
  • Preventing broken images due to removed or inaccessible external resources
  • Enforcing strict validation in editorial workflows

Post-Installation

After installation, go to /admin/config/content/inline-image-saver/settings and enable the options you need.

Demo

Validation in action:
When a user tries to save a text field with an external image that lacks proper data-entity-type and data-entity-uuid attributes, the module prevents saving and shows a validation error.

Downloading in action:
If automatic downloading is enabled, invalid external images are saved by downloading them and replacing the markup with a valid file entity reference.
Before save:

After save:

  • Optional integration with the File Hash module for deduplication

Similar projects

  • No similar projects found; create an issue to suggest one
Drupal 10–11

Ask your assistant about Inline Image Saver [CKEditor]

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • editor Drupal core
  • text Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
5
Tracked since
Jul 2024
Latest release
10 months ago
Releases (12 mo)
1 ▼ from 2
Maintenance
Slowing

Release Timeline

Releases

Version Type Core PHP Release date
2.0.1 Stable 10–11 Dec 7, 2025
2.0.0 Stable 10–11 Jul 28, 2025
2.0.x-dev Dev 10–11 Jul 27, 2025
1.0.0-alpha1 Pre-release 10–11 Jul 31, 2024
1.0.x-dev Dev 10–11 Jul 31, 2024