Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Release: Opensolr Search 4.5.0 Minor update available for module opensolr_search (4.5.0). Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Usage Milestone: Simplify Module simplify crossed 10,000 active installs. Usage Milestone: Views Reference Filter Module entityreference_filter crossed 10,000 active installs. Usage Milestone: Dropdown Language Module dropdown_language crossed 10,000 active installs. Usage Milestone: Paragraphs Browser Module paragraphs_browser crossed 10,000 active installs. Usage Milestone: OpenAPI Module openapi crossed 10,000 active installs. Usage Milestone: Decoupled Router Module decoupled_router crossed 10,000 active installs. Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Sophron

35,255 sites Security covered Drupal 10–11
View on drupal.org

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

Activity

Tracked releases
12
Tracked since
Dec 2024
Latest release
2 months ago
Releases (12 mo)
4 ▼ from 8
Maintenance
Active

Release Timeline

Releases

Version Type Core 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