This project is not covered by Drupal’s security advisory policy.
Modern Image
Modern Image provides a safe and extensible approach to modernizing images across Drupal websites using next-generation image formats such as WebP and AVIF, with an architecture designed to support additional formats in the future.
Unlike modules focused primarily on generating modern image derivatives, Modern Image is designed around site-wide image migration, reference integrity, validation, and rollback safety.
Why Modern Image?
Large Drupal websites can contain thousands—or even millions—of legacy JPEG and PNG images referenced throughout content, Media entities, Paragraphs, image fields, CKEditor content, image styles, translations, and revisions.
Replacing these files is not simply an image-conversion problem. Existing references must continue working, conversions must be validated, and administrators need a safe way to understand the impact before modifying production content.
Modern Image aims to provide that safety layer.
Key features
* Site-wide discovery of managed JPEG and PNG images
* Safe dry-run analysis before making changes
* WebP and AVIF support
* Pluggable architecture for future image formats
* Managed-file and reference preservation
* Conversion validation before migration
* Protection against replacing an image when the converted version is larger
* Backup and rollback-oriented architecture
* Queue and batch processing for large image libraries
* Drush support for scanning and migration workflows
* Image style and Responsive Image awareness
* Support considerations for Media, Paragraphs and CKEditor content
* Public and private file support
* Multilingual and revision-aware architecture
* Extensible storage design for S3/object-storage environments
* Detailed migration and error reporting
Safety first
Modern Image is intentionally conservative with existing files.
Potentially destructive operations are designed around:
Scan → Dry run → Convert → Validate → Update → Verify → Cleanup
Original images are not intended to be deleted simply because a conversion succeeds. The project is being designed around validation, recoverability, and configurable retention of original assets.
Extensible beyond WebP
Modern Image is not intended to be a WebP-only module.
Image formats are treated as pluggable capabilities so Drupal sites can adopt newer formats when they become technically appropriate without redesigning the entire migration system.
WebP and AVIF are the initial targets, with the architecture designed to accommodate future formats as browser, Drupal, PHP image-toolkit, and infrastructure support matures.
Built for real Drupal sites
The project is being designed with complex Drupal installations in mind, including sites using:
* Media
* Paragraphs
* CKEditor
* Responsive Image
* Image styles
* Entity revisions
* Content translations
* Public and private files
* Large managed-file libraries
* Queue and Batch APIs
* Drush
* Remote/object storage and CDN architectures
Large image libraries are processed incrementally rather than requiring the entire library to be loaded into memory.
Project philosophy
The goal of Modern Image is simple:
**Modernize Drupal's image library without sacrificing content integrity, operational safety, or future extensibility.**
Performance improvements are valuable, but they should never come at the cost of broken images, lost references, irreversible migrations, or unstable production websites.
Development status
Modern Image is under active development.
Early releases focus on the safety foundation, including image discovery, dry-run reporting, format capability detection, validation, automated testing, and migration architecture before enabling destructive site-wide replacement workflows.
Production sites should carefully review the release notes and test migrations in a non-production environment before enabling migration features.
Community and contributions
Bug reports, feature requests, interoperability reports, documentation improvements, testing, and patches are welcome.
Particular interest is given to real-world experience involving large Drupal installations, Media and Paragraphs, multilingual sites, private files, responsive images, remote storage, CDNs, and additional modern image formats.
Project information
- Project categories: Content editing experience, Developer tools, Media
- Created by sibustephen on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
