PHPackages                             codeinc/media-types - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. codeinc/media-types

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

codeinc/media-types
===================

A media / MIME type lookup tool

1.0.2(7y ago)03273MITPHPPHP &gt;=7.1

Since Apr 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/CodeIncHQ/MediaTypes)[ Packagist](https://packagist.org/packages/codeinc/media-types)[ Docs](https://github.com/CodeIncHQ/MediaTypes)[ RSS](/packages/codeinc-media-types/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (1)Versions (5)Used By (3)

A media / MIME type lookup tool
===============================

[](#a-media--mime-type-lookup-tool)

This PHP 7.1 library provides tools to lookup [Media Types](https://en.wikipedia.org/wiki/Media_type) (formerly known as MIME types). The library uses an [internal list](assets/media-types.json) of media types generated from [Apache's httpd MIME type list](https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types). Apache's list itself is generated using the [IANA official media types repository](https://www.iana.org/assignments/media-types/media-types.xml).

The media types list is loaded once in memory. You can instantiate the class or call `MediaTypes::getMediaTypes()` has many time as you want, no time will be lost reparsing the JSON list.

Usage
-----

[](#usage)

```
