Return an array of MIME extension mappings.

Returns the mapping after modules have altered the default mapping.

Return value

Array of mimetypes correlated to the extensions that relate to them.

See also


1 call to file_mimetype_mapping()
DrupalLocalStreamWrapper::getMimeType in includes/
Base implementation of getMimeType().


includes/, line 18
Provides mimetype mappings.


function file_mimetype_mapping() {
  $mapping =& drupal_static(__FUNCTION__);
  if (!isset($mapping)) {
    $mapping = file_default_mimetype_mapping();

    // Allow modules to alter the default mapping.
    drupal_alter('file_mimetype_mapping', $mapping);
  return $mapping;