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)891MITPHP

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 1w 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 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

1663d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6260068?v=4)[Leon](/maintainers/leongrdic)[@leongrdic](https://github.com/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

[goat1000/svggraph

Generates SVG graphs

135931.0k3](/packages/goat1000-svggraph)[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

138121.6k7](/packages/stefangabos-zebra-image)[treinetic/imageartist

ImageArtist is a php gd Wrapper which makes Image manipulation insanely easy, we introduce ImageArtist as Photoshop for php

8783.2k](/packages/treinetic-imageartist)[johncarter/filament-focal-point-picker

An image focal point picker for Filament Admin.

4431.7k1](/packages/johncarter-filament-focal-point-picker)[yk/laravel-ocr

A wrapper for gocr.

1356.6k](/packages/yk-laravel-ocr)

PHPackages © 2026

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