PHPackages                             leongrdic/imgman - 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. [Image &amp; Media](/categories/media)
4. /
5. leongrdic/imgman

ActiveLibrary[Image &amp; Media](/categories/media)

leongrdic/imgman
================

simple php image manipulator that can downscale and compress e.g. thumbnails and profile pictures

1.0.0(4y ago)885MITPHP

Since Jan 26Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

imgman
======

[](#imgman)

This library uses GD and EXIF (optional) PHP extensions so make sure you have them installed.

It also uses the latest PHP 8.1 features and backwards compatibility isn't yet supported.

Install:
--------

[](#install)

```
composer require leongrdic/imgman

```

```
use \Le\ImgMan\{ImgMan, ImageFormat};
```

Supported formats
-----------------

[](#supported-formats)

### Input

[](#input)

- any image format supported by php-gd

Input methods: `fromDataUrl()`, `fromString()`, `fromFile()`

### Output

[](#output)

Call the `output()` method with the wanted output format:

- `ImageFormat::jpeg`
- `ImageFormat::png`
- `ImageFormat::webp` (make sure your php-gd is configured to work with webp)

After that use: `toDataUrl()`, `toString()`, `toFile()`

Example usages
--------------

[](#example-usages)

```
$rawImageBytes = (new ImgMan)
    ->fromDataUrl($dataUrlFromJS)
    ->cacheExif()
    ->downscale(2048)
    ->rotateFromExif() // rotating after downscaling should use less memory and be a bit faster
    ->output(ImageFormat::jpeg, quality: 75)
    ->toString();
```

```
(new ImgMan)
    ->fromFile('example.png')
    ->downscale(1920, 1080)
    ->output(ImageFormat::png)
    ->toFile(); // use input filename (replace original file)
```

```
$dataUrl = (new ImgMan)
    ->fromString($rawImageBytes)
    ->output(ImageFormat::webp, quality: 80)
    ->toDataUrl();
```

Notice
======

[](#notice)

This library hasn't yet been fully tested and is to be used at your own responsibility. Any feedback and improvement suggestions are appreciated!

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

1563d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82e25ee9c2189d89148b77cb15477330861242577535ff77a73773aba317e369?d=identicon)[leongrdic](/maintainers/leongrdic)

---

Top Contributors

[![leongrdic](https://avatars.githubusercontent.com/u/6260068?v=4)](https://github.com/leongrdic "leongrdic (5 commits)")

---

Tags

compress-imagesimage-processingphpphp-gdphp8thumbnail

### Embed Badge

![Health badge](/badges/leongrdic-imgman/health.svg)

```
[![Health](https://phpackages.com/badges/leongrdic-imgman/health.svg)](https://phpackages.com/packages/leongrdic-imgman)
```

###  Alternatives

[milon/barcode

Barcode generator like Qr Code, PDF417, C39, C39+, C39E, C39E+, C93, S25, S25+, I25, I25+, C128, C128A, C128B, C128C, 2-Digits UPC-Based Extention, 5-Digits UPC-Based Extention, EAN 8, EAN 13, UPC-A, UPC-E, MSI (Variation of Plessey code)

1.5k13.3M39](/packages/milon-barcode)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k22](/packages/bkwld-croppa)[marc1706/fast-image-size

fast-image-size is a PHP library that does almost everything PHP's getimagesize() does but without the large overhead of downloading the complete file.

959.4M20](/packages/marc1706-fast-image-size)[char0n/ffmpeg-php

PHP wrapper for FFmpeg application

495225.1k1](/packages/char0n-ffmpeg-php)[goat1000/svggraph

Generates SVG graphs

132849.6k3](/packages/goat1000-svggraph)[cohensive/embed

Media Embed (for Laravel or as a standalone).

120370.4k](/packages/cohensive-embed)

PHPackages © 2026

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