PHPackages                             exinfinite/img-upload - 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. exinfinite/img-upload

ActiveLibrary

exinfinite/img-upload
=====================

image upload and validate by exif

1.0.0(5y ago)05MITPHPPHP &gt;=5.6

Since Dec 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/exinfinite/ImgUpload)[ Packagist](https://packagist.org/packages/exinfinite/img-upload)[ RSS](/packages/exinfinite-img-upload/feed)WikiDiscussions main Synced 5d ago

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

ImgUpload
=========

[](#imgupload)

[![Packagist PHP Version Support](https://camo.githubusercontent.com/d85ca6668ea8aacc45a8b28ddff7f0da6f7199c43341764dd5508a3540a793cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6578696e66696e6974652f696d672d75706c6f6164)](https://camo.githubusercontent.com/d85ca6668ea8aacc45a8b28ddff7f0da6f7199c43341764dd5508a3540a793cc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6578696e66696e6974652f696d672d75706c6f6164)[![GitHub release (latest SemVer)](https://camo.githubusercontent.com/0a9abfac4849610daa78b42d998e2ff325697148510fc0b8e09d66e8160de002/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6578696e66696e6974652f496d6755706c6f6164)](https://camo.githubusercontent.com/0a9abfac4849610daa78b42d998e2ff325697148510fc0b8e09d66e8160de002/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6578696e66696e6974652f496d6755706c6f6164)[![Packagist Version](https://camo.githubusercontent.com/751c370dd4c567f1768ce260d0d2f05c4d380ba9b4c56b677b88da7e08c1e3aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6578696e66696e6974652f696d672d75706c6f6164)](https://camo.githubusercontent.com/751c370dd4c567f1768ce260d0d2f05c4d380ba9b4c56b677b88da7e08c1e3aa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6578696e66696e6974652f696d672d75706c6f6164)[![Packagist Downloads](https://camo.githubusercontent.com/2935fc666a82b916e1388a010b1764ff572a4f5b3b5cf5a10dc268c13ce46b5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6578696e66696e6974652f696d672d75706c6f6164)](https://camo.githubusercontent.com/2935fc666a82b916e1388a010b1764ff572a4f5b3b5cf5a10dc268c13ce46b5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6578696e66696e6974652f696d672d75706c6f6164)[![GitHub](https://camo.githubusercontent.com/72ac9e3d0d70b3eafec20d314f350b7182cff6c97a9cd65bcda05c4368a0bfad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6578696e66696e6974652f496d6755706c6f6164)](https://camo.githubusercontent.com/72ac9e3d0d70b3eafec20d314f350b7182cff6c97a9cd65bcda05c4368a0bfad/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6578696e66696e6974652f496d6755706c6f6164)

> 需要gd、exif extension

安裝
--

[](#安裝)

```
composer require exinfinite/img-upload
```

使用
--

[](#使用)

### 初始化

[](#初始化)

```
//支援jpg、jpeg、png
$img = new Exinfinite\ImgUpload\ImgExif("upload dir", "name of input[type=file]");
```

### 基本用法

[](#基本用法)

```
$fileinfo = $img->setFitSize(1920)->save();//max-width:1920
```

### 常用設定

[](#常用設定)

```
$filename = "filename without extension";//程式自動判斷檔案類型
$img->getDimension();//圖檔尺寸
$img->getExif();//EXIF資訊
$img->md5Hash();//圖檔hash
$img->sizeLimit("10m");//default:20m
$img->mkdir("dir path");//建立資料夾
$img->setFitSize("max width", "max height");//自動縮圖,0為不限制
$img->save("dir_path/{$filename}");//儲存處理後的檔案
$img->upload("dir_path/{$filename}");//上傳原始圖檔,若需要此操作,需放最後執行
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

1989d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19932513?v=4)[exinfinite](/maintainers/exinfinite)[@exinfinite](https://github.com/exinfinite)

---

Top Contributors

[![exinfinite](https://avatars.githubusercontent.com/u/19932513?v=4)](https://github.com/exinfinite "exinfinite (6 commits)")

### Embed Badge

![Health badge](/badges/exinfinite-img-upload/health.svg)

```
[![Health](https://phpackages.com/badges/exinfinite-img-upload/health.svg)](https://phpackages.com/packages/exinfinite-img-upload)
```

###  Alternatives

[kitetail/zttp

A developer-experience focused HTTP client, optimized for most common use cases.

1.7k1.2M72](/packages/kitetail-zttp)[cpriego/valet-linux

A more enjoyable local development experience for Linux.

1.5k135.9k](/packages/cpriego-valet-linux)[freearhey/wikidata

A PHP client for working with Wikidata API.

5628.6k](/packages/freearhey-wikidata)[mvdnbrk/dhlparcel-php-api

DHL Parcel API client for PHP

3957.9k5](/packages/mvdnbrk-dhlparcel-php-api)[jofrysutanto/windsor

YAML-ised Configuration for ACF

549.2k](/packages/jofrysutanto-windsor)[agungsugiarto/codeigniter4-authentication

Provides an API for authentication and includes concrete authentication adapters for common use case scenarios

494.5k2](/packages/agungsugiarto-codeigniter4-authentication)

PHPackages © 2026

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