PHPackages                             fknussel/image-uploader - 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. fknussel/image-uploader

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

fknussel/image-uploader
=======================

A simple and elegant PHP library for uploading and serving images

v1.2.0(10y ago)019MITPHPPHP &gt;=5.5.0

Since May 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/fknussel/image-uploader)[ Packagist](https://packagist.org/packages/fknussel/image-uploader)[ Docs](https://github.com/fknussel/image-uploader)[ RSS](/packages/fknussel-image-uploader/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

image-uploader
==============

[](#image-uploader)

A simple yet elegant PHP library for uploading and serving images. The aim of this project is to act as an interface to image uploading and serving on a media server.

Prerequisites
-------------

[](#prerequisites)

1. Successfully tested on PHP &gt;= 5.5
2. [GD](http://php.net/manual/en/book.image.php) is required (`sudo apt-get install php5-gd` will do)

Installation using Composer
---------------------------

[](#installation-using-composer)

Add the following dependency to your `composer.json` file:

```
{
  "require": {
    "fknussel/image-uploader": "dev-master"
  }
}
```

Fetch the dependecy by running:

```
php composer.phar install

```

Finally, import `image-uploader` into your script:

```
require("vendor/autoload.php");
```

Usage
-----

[](#usage)

### Serving images

[](#serving-images)

```
try {
  $imageUploader = new ImageUploader(UPLOAD_DIR, MD5_HASH_SALT);
  $res = $imageUploader->serve($_GET["identifier"]);
  var_dump($res);
} catch (Exception $e) {
  var_dump($e);
}
```

### Uploading images

[](#uploading-images)

```
try {
  $imageUploader = new ImageUploader();
  $imageUploader->setPath(UPLOAD_DIR);
  $imageUploader->setSalt(MD5_HASH_SALT);
  $imageUploader->setMaxFileSize(MAX_FILE_SIZE);

  $uid = time() . rand();
  $success = $imageUploader->upload($_FILES[INPUT_FIELD_NAME], $uid);

  echo json_encode(array("success" => $success));
} catch (Exception $e) {
  die($e);
}
```

License
-------

[](#license)

image-uploader is [MIT licensed](https://opensource.org/licenses/MIT).

This project is a somewhat modified version of [Dhaval Kapil](https://github.com/DhavalKapil)'s [image-uploader](https://github.com/DhavalKapil/image-uploader/).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75.8% 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 ~0 days

Total

3

Last Release

3661d ago

### Community

Maintainers

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

---

Top Contributors

[![DhavalKapil](https://avatars.githubusercontent.com/u/6170016?v=4)](https://github.com/DhavalKapil "DhavalKapil (25 commits)")[![fed](https://avatars.githubusercontent.com/u/1261453?v=4)](https://github.com/fed "fed (5 commits)")[![adiitya](https://avatars.githubusercontent.com/u/6408188?v=4)](https://github.com/adiitya "adiitya (2 commits)")[![iAmMrinal0](https://avatars.githubusercontent.com/u/890062?v=4)](https://github.com/iAmMrinal0 "iAmMrinal0 (1 commits)")

---

Tags

image-uploadphpimageuploadserve

### Embed Badge

![Health badge](/badges/fknussel-image-uploader/health.svg)

```
[![Health](https://phpackages.com/badges/fknussel-image-uploader/health.svg)](https://phpackages.com/packages/fknussel-image-uploader)
```

###  Alternatives

[kartik-v/bootstrap-fileinput

An enhanced HTML 5 file input for Bootstrap 5.x, 4.x, and 3.x with features for file preview for many file types, multiple selection, ajax uploads, and more.

5.4k7.9M13](/packages/kartik-v-bootstrap-fileinput)[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[sopamo/laravel-filepond

Laravel backend module for filepond uploads

215272.2k3](/packages/sopamo-laravel-filepond)[samayo/bulletproof

A simple and secure PHP image uploader

39853.3k4](/packages/samayo-bulletproof)[fof/upload

The file upload extension for the Flarum forum with insane intelligence.

188171.7k15](/packages/fof-upload)[mohorev/yii2-upload-behavior

Upload behavior for Yii 2

128265.5k9](/packages/mohorev-yii2-upload-behavior)

PHPackages © 2026

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