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.

Sophron

36,746 sites Security covered
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.

Activity

Total releases
10
First release
Apr 2025
Latest release
1 month ago
Releases (12 mo)
4 ▼ from 6
Maintenance
Active

Release Timeline

Releases

Version Type Release date
2.2.2 Stable Jun 13, 2026
3.1.1 Stable Mar 23, 2026
3.1.0 Stable Feb 10, 2026
3.1.x-dev Dev Jan 1, 2026
3.0.0 Stable Jul 9, 2025
3.0.0-rc1 Pre-release Jun 8, 2025
3.0.0-alpha2 Pre-release Apr 26, 2025
3.0.0-alpha1 Pre-release Apr 16, 2025
3.0.x-dev Dev Apr 16, 2025
2.2.1 Stable Apr 16, 2025