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

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

pensiero/image-uploader
=======================

Image uploader and resizer

v0.1.0(9y ago)232BSD-3-ClausePHPPHP &gt;=7.0

Since Feb 6Pushed 9y ago3 watchersCompare

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

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Image Upload
============

[](#image-upload)

API based service that allow to save, resize and read images

Features
--------

[](#features)

- Save on **Filesystem**
- Save on **AWS**
- Possibility to add Validators
- Possibility to add Filters
- PHP7 strict mode
- Link with public Postman collection
- Unit testing
- Submit on packagist (composer)
- Host the demo somewhere
- Auth token API protection

Configuration
-------------

[](#configuration)

Environment variables allowed:

- `SAVE_HANDLER`: (filesystem|aws) where you will save the images
- `AWS_ACCESS_KEY_ID`:
- `AWS_SECRET_ACCESS_KEY`:
- `AWS_REGION`:
- `AWS_BUCKET`:
- `OPTIMIZE`: (0|1) strip exif data in order to reduce image size
- `MAX_DIMENSIONS`: (example: 4096x4096) maximum allowed dimensions
- `MAX_SIZE`: (example: 10240) maximum allowed size in kb
- `ALLOWED_DIMENSIONS`: (example: 1400x460;1280x460;800x600) dimensions allowed when requesting a resize version of a previously uploaded image

Usage via API
-------------

[](#usage-via-api)

[![Run in Postman](https://camo.githubusercontent.com/82ccefddb001e2caf9d399f1153fdda561cf3da341bb270e18644d516906bc64/68747470733a2f2f72756e2e7073746d6e2e696f2f627574746f6e2e737667)](https://app.getpostman.com/run-collection/0c7cee4b3b9d99cfbd2f)

In order to receive a JSON response, you should add the following headers:

- `Content-Type: application/json`
- `Accept: application/json; charset=utf-8`

> We are supposing that you uploaded this application on *theappleisonthetable.com*

### GET

[](#get-httpstheappleisonthetablecom)

> Return info about a previously uploaded image

Parameters:

- `id`: (*optional*: integer) id of a previously uploaded image

Example GET data: `{}`

Example response:

```
  {
    "ping": "pong"
  }

```

---

Example GET data: `{"id": "5897209a9325f7-78554697"}`

Example response:

```
  {
    "status_code": 200,
    "id": "5897209a9325f7-78554697",
    "url": "http://image-uploader.dev/i/5897209a9325f7-78554697_0_0.jpg",
    "url_dynamic": "http://image-uploader.dev/i/5897209a9325f7-78554697_#WIDTH#_#HEIGHT#.jpg",
    "width": null,
    "height": null
  }

```

### POST

[](#post-httpstheappleisonthetablecom)

> Upload an image

Parameters:

- `source`: (*required*: url|base64 string|uploaded file) you can send a remote url, an image base64 encoded (without new lines in JSON) or upload a file (see an example in the [public/upload.php](../tree/master/public/upload.php)
- `width`: (*optional*: integer) if specified, the original image will be resized to the specified width before uploading it
- `height`: (*optional*: integer) if specified, the original image will be resized to the specified height before uploading it

> Note: if you specify only the `width` or the `height` param, the image will be proportionally resized

Example POST data: `{"source": "...very long base64 string..."}`

Example response:

```
  {
    "status_code": 200,
    "id": "5898c96c4a2d62-52410036",
    "url": "http://image-uploader.dev/i/5898c96c4a2d62-52410036_0_0.jpg",
    "url_dynamic": "http://image-uploader.dev/i/5898c96c4a2d62-52410036_#WIDTH#_#HEIGHT#.jpg",
    "width": null,
    "height": null
  }

```

Demo
----

[](#demo)

Hosting in progress...

Examples
--------

[](#examples)

If you want to use directly the [Image](../tree/master/src/ImageUploader/Entity/Image.php) object in your application (and not as a standalone API service), you can find some examples inside the [public/examples](../tree/master/public/examples) directory.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.4% 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 ~4 days

Total

3

Last Release

3423d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2010696?v=4)[Oscar Fanelli](/maintainers/pensiero)[@pensiero](https://github.com/pensiero)

---

Top Contributors

[![pensiero](https://avatars.githubusercontent.com/u/2010696?v=4)](https://github.com/pensiero "pensiero (63 commits)")[![Leen15](https://avatars.githubusercontent.com/u/3629071?v=4)](https://github.com/Leen15 "Leen15 (1 commits)")

---

Tags

awscomposerfilesystemimageimage-uploadersave-handlersuploaduploader

### Embed Badge

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

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

###  Alternatives

[craftcms/aws-s3

Amazon S3 integration for Craft CMS

631.5M28](/packages/craftcms-aws-s3)[silverstripe/s3

Adds SilverStripe support for using the S3 adapter for Flysystem

19329.2k1](/packages/silverstripe-s3)[servd/craft-asset-storage

Servd Asset Storage and Helpers integration for Craft CMS

1182.9k9](/packages/servd-craft-asset-storage)[blackbit_digital_commerce/pimcore-backup

Backup and restore Pimcore projects

1294.6k](/packages/blackbit-digital-commerce-pimcore-backup)

PHPackages © 2026

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