PHPackages                             apxcde/mime-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. apxcde/mime-types

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

apxcde/mime-types
=================

A converter between mime types and file extensions.

v1.0.0(1y ago)01.2kMITPHP

Since May 31Pushed 1y agoCompare

[ Source](https://github.com/apxcde/mime-types)[ Packagist](https://packagist.org/packages/apxcde/mime-types)[ RSS](/packages/apxcde-mime-types/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Mime Types
==========

[](#mime-types)

Converts mime types to the proper file extensions and vice versa.

Installation
------------

[](#installation)

```
composer require apxcde/mime-types
```

Usage
-----

[](#usage)

Create a new mime type converter instance:

```
use Apxcde\MimeTypes\MimeTypeConverter;

$converter = new MimeTypeConverter;
```

Get the proper mime type for a file extension:

```
echo $converter->toMimeType('jpeg');
```

or find a file extension to the given mime type:

```
echo $converter->toExtension('image/jpeg');
```

Multiple extensions could belong to the same mime type so the code above will return with the first matching one.

Development
-----------

[](#development)

Create the Docker based development environment:

```
make dev
```

Check the coding style and run unit tests:

```
make test
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

717d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d7023a5efc7f59260c31cdb6ac5d2483930a49c6ab56925ded063c37cfb4200f?d=identicon)[apxcde](/maintainers/apxcde)

---

Top Contributors

[![mwamodo](https://avatars.githubusercontent.com/u/52991058?v=4)](https://github.com/mwamodo "mwamodo (1 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/apxcde-mime-types/health.svg)

```
[![Health](https://phpackages.com/badges/apxcde-mime-types/health.svg)](https://phpackages.com/packages/apxcde-mime-types)
```

###  Alternatives

[hiraku/xml_builder

Simple DSL for building XML

141.6k1](/packages/hiraku-xml-builder)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
