PHPackages                             vincoweb/easy-php-file-info - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. vincoweb/easy-php-file-info

ActiveLibrary[File &amp; Storage](/categories/file-storage)

vincoweb/easy-php-file-info
===========================

Get file information from local and also remote file(mime type, extension, file name ...).

v1.0.6(9y ago)22.9k↓84.2%1UnlicensedPHPPHP &gt;=5.5.0

Since Mar 7Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vincoweb/easy-php-file-info)[ Packagist](https://packagist.org/packages/vincoweb/easy-php-file-info)[ RSS](/packages/vincoweb-easy-php-file-info/feed)WikiDiscussions master Synced today

READMEChangelog (6)DependenciesVersions (7)Used By (0)

easy-php-file-info
==================

[](#easy-php-file-info)

Get easily file information from local and also remote file (mime, extension, file name ...)

\##Installation

```
composer require vincoweb/easy-php-file-info=dev-master
```

Usage
-----

[](#usage)

```
$finfo = new \VincoWeb\FileInfo\FileInfo();
$i = $finfo->get($file_link [, bool $return_object = false ]);
```

Variable "$file\_link" can contains **path** and also **URL**.
Variable "$return\_object" is optional. Set to **true** for return object instead of array.

### Laravel support

[](#laravel-support)

add provider and alias in config/app.php

```
'providers' => [
    ...
    VincoWeb\FileInfo\FileInfoServiceProvider::class
]

...

'aliases' => [
    ...
    'FileInfo'	=> VincoWeb\FileInfo\FileInfoFacade::class,
],
```

and in laravel you use it

```
    FileInfo::get($file_link [, bool $return_object = false ]);
```

Example
-------

[](#example)

### Code

[](#code)

```
get('https://www.google.sk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png');
```

### Result

[](#result)

```
Array ( [link] => https://www.google.sk/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png [mime] => image/png [size] => 13504 [last_modified] => Fri, 04 Sep 2015 22:33:08 GMT [etag] => [extension] => png [type] => image [location] => url [width] => 544 [height] => 3 )
```

Result returns array with these keys:

- **link** - where file was finded (if there was redirection, it contains reditected location)
- **location** - location of $file\_link ( return string "URL" or "path")
- **mime** - mime type (only from header, if $link is URL).
- **size** - file size (if is taken from header, it can contain value "-1")
- **last\_modified** - date of last modified
- **etag** - file header etag from ULR (can be empty) or md5 hash of file from path
- **basename** - basename, name of file
- **extension** - file extension got from header(if file is image, it contains real extension )
- **type** - mime type or string "image" if file is normal image
- \[**width**\] - width dimension, **this key exists only if file is image**
- \[**height**\] - height dimension, **this key exists only if file is image**

It can return boolean **false** (i.e. if file not exist).

Features
--------

[](#features)

**IF YOU WANT NEW FEATURES WRITE [NEW ISSUE](https://github.com/vincoweb/easy-php-file-info/issues/new) PLS :)**

Licence
-------

[](#licence)

[Unlicense](http://unlicense.org/). You can do what you want. Be free!

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 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

Every ~31 days

Total

5

Last Release

3642d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f707809bba03961d503ce31654d15df63689b47678485bf38643e0c619b7098?d=identicon)[vincoweb](/maintainers/vincoweb)

---

Top Contributors

[![vincoweb](https://avatars.githubusercontent.com/u/16268631?v=4)](https://github.com/vincoweb "vincoweb (54 commits)")

---

Tags

phpfile infoimage infofile data

### Embed Badge

![Health badge](/badges/vincoweb-easy-php-file-info/health.svg)

```
[![Health](https://phpackages.com/badges/vincoweb-easy-php-file-info/health.svg)](https://phpackages.com/packages/vincoweb-easy-php-file-info)
```

###  Alternatives

[blueimp/jquery-file-upload

File Upload widget for jQuery.

141.5M20](/packages/blueimp-jquery-file-upload)

PHPackages © 2026

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