Sophron
Sophron enhances Drupal's MIME type management. It significantly expands the number of recognized MIME types and file extensions, and offers an API for managing these definitions, optionally replacing Drupal's default MIME type guessing mechanism.
Sophron of Syracuse (Greek: Σώφρων ὁ Συρακούσιος, fl. 430 BC) was a writer of mimes. (Wikipedia)
Sophron of Drupal is a module to enhance MIME type management, based on the FileEye/MimeMap library.
Features
- Enhances Drupal's MIME type detection based on file extension to recognise 1200+ MIME types from 1600+ file extensions (vs Drupal's 360 MIME types and 475 file extensions).
- Provides an extensive MIME type management API through FileEye/MimeMap.
- Optionally replaces Drupal's core MIME type extension-based guesser.
Override Drupal core MIME type guessing
The Sophron module by itself just provides a service and an API for MIME type management. You can enable the complimentary Sophron guesser module to let Sophron manage the MIME type guessing, overriding Drupal core's guesser.
NOTE: The Sophron guesser module does not invoke the hook_file_mimetype_mapping_alter hook to allow altering the mapping of MIME types to file extensions. If you need to modify mappings, use the Sophron configuration UI to replicate any mapping changes.
Alternatively, modules can implement event subscribers that react to a Drupal\sophron\Event\MapEvent::INIT event that is fired when a map is initialised, and make the necessary changes to the mappings.
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
1 tracked project depends on this one
- ImageMagick 37,827 sites
Activity
Release Timeline
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.2.2 | Stable | 10–11 | Jun 13, 2026 | ||
| 3.1.1 | Stable | 11 | Mar 23, 2026 | ||
| 3.1.0 | Stable | 11 | Feb 10, 2026 | ||
| 3.1.x-dev | Dev | 11 | Jan 1, 2026 | ||
| 3.0.0 | Stable | 11 | Jul 9, 2025 | ||
| 3.0.0-rc1 | Pre-release | 11 | Jun 8, 2025 | ||
| 3.0.0-alpha2 | Pre-release | 11 | Apr 26, 2025 | ||
| 3.0.0-alpha1 | Pre-release | 11 | Apr 16, 2025 | ||
| 3.0.x-dev | Dev | 11 | Apr 16, 2025 | ||
| 2.2.1 | Stable | 10–11 | Apr 16, 2025 | ||
| 2.2.0 | Stable | 10–11 | Dec 17, 2024 | ||
| 2.2.x-dev | Dev | 10–11 | Dec 17, 2024 |