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

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

kamlesh-defsys/mime-types
=========================

A converter between mime types and file extensions.

02PHP

Since Jan 13Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

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

[](#mime-types)

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

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

[](#installation)

```
composer require kamlesh-defsys/mime-types
```

Usage
-----

[](#usage)

Create a new mime type converter instance:

```
use kamleshDefsys\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

15

—

LowBetter than 3% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

Top contributor holds 60% 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.

### Community

Maintainers

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

---

Top Contributors

[![fabricioaloware](https://avatars.githubusercontent.com/u/151675341?v=4)](https://github.com/fabricioaloware "fabricioaloware (3 commits)")[![kamleshDefsys](https://avatars.githubusercontent.com/u/51432144?v=4)](https://github.com/kamleshDefsys "kamleshDefsys (2 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel-enso/history-tracker

Model history tracking dependency for Laravel Enso

5246.8k5](/packages/laravel-enso-history-tracker)[guywarner/laravel-google-chat-alerts

Send a message to GoogleChat

5333.0k](/packages/guywarner-laravel-google-chat-alerts)[phpu/calendar

中国日历，通过天文计算和民间推算方法，准确计算出公历-1000年至3000年的农历、干支、节气等，同时支持多配置、多语言、多时区。

201.7k](/packages/phpu-calendar)

PHPackages © 2026

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