PHPackages                             ripaclub/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. ripaclub/imgman

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

ripaclub/imgman
===============

A library designed to create, modify, handle, and store images from any protocol

v1.2.2(9y ago)392411BSD-2-ClausePHPPHP &gt;=5.5.0

Since Aug 29Pushed 9y ago2 watchersCompare

[ Source](https://github.com/ripaclub/imgman)[ Packagist](https://packagist.org/packages/ripaclub/imgman)[ Docs](https://github.com/ripaclub/imgman)[ RSS](/packages/ripaclub-imgman/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (7)Versions (15)Used By (1)

Image manager
=============

[](#image-manager)

[![Latest Stable Version](https://camo.githubusercontent.com/b854349fc11b041cda8cdbdd51143c7d54139584cd7bdbaa1b67d11a539f844a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72697061636c75622f696d676d616e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ripaclub/imgman) [![Build Status](https://camo.githubusercontent.com/e487cadf2b2f644afb09018f1e448682435d28e3a877dd0c7e40a06648b4e886/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f72697061636c75622f696d676d616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/ripaclub/imgman) [![Coverage Status](https://camo.githubusercontent.com/b03a943af6a289d7cdb052c5be910a962229d7083ef441c2e17014ed83fe0deb/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f72697061636c75622f696d676d616e2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/r/ripaclub/imgman)

ImgMan is a library that allows you to create various image renditions from any [PHP supported URL-style protocol](http://php.net/manual/en/wrappers.php) containing a picture.

You can modify an image (e.g., resize, crop, format, fit in, fit out, rotate) and save different renditions stored in your configuration.

Requisites
----------

[](#requisites)

- PHP &gt;= 5.5
- Composer
- Imagick (the only adapter currently supported to manipulate image)

Features
--------

[](#features)

ImgMan has various features:

- Core

    contains the engine that execute the operations on the image. `ImageMagick` is the only adapter present.
- Operation

    Contains a class, `HelperPluginManager`, that is a `AbstractPluginManager` where are config all operation that can attach to a rendition (i.e. `Compression`, `Crop`, `FitIn`, `FitOut`, `Format`, `Resize`, `Rotate`,`ScaleToHeight`,`ScaleToWidth`)
- Storage

    ImgMan allows you to save the image in several layers persistence, via `StorageInterface` objects (i.e. `FileSystem`, `Mongo`)
- Image

    Contains the class used to the image
- Service

    A set of classes aimed at the instantiation of ImgMan service. With this service you can save the image in all renditions configured in the service (`grab` function) You can also save update, and delete an image in a specific redition

Installation
------------

[](#installation)

Install `ImageImagick` (version &gt; 3.1.2) in php extension.

Add `ripaclub/imgman` to your `composer.json`.

```
{
   "require": {
       "ripaclub/imgman": "0.5.*"
   }
}

```

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

[](#configuration)

Configure service manager with service factory (for storage and service), plugin manager and imagick adapter.

```
return [
    \\ ...
    'abstract_factories' => [
         // Load abstract service
        'ImgMan\Service\ImageServiceAbstractFactory',
         // Load abstract factory for mongo storage
        'ImgMan\Storage\Adapter\Mongo\MongoDbAbstractServiceFactory',
        'ImgMan\Storage\Adapter\Mongo\MongoAdapterAbstractServiceFactory',
         // Load abstract factory to FileSystem storage
        'ImgMan\Storage\Adapter\FileSystem\FileSystemAbstractServiceFactory'
          // Load abstract factory to aws storage previus import of aws/aws-sdk-php 3.17.6
        'ImgMan\Storage\Adapter\Cdn\Amazon\S3\S3ServiceAbstractFactory',
        'ImgMan\Storage\Adapter\Cdn\Amazon\CloudFront\CloudFrontServiceAbstractFactory',
        'ImgMan\Storage\Adapter\Cdn\AmazonAdapterAbstractFactory',
    ],
    'factories' => [
         // Load (operation) helper plugin manager
        'ImgMan\Operation\HelperPluginManager' => 'ImgMan\Operation\HelperPluginManagerFactory',
    ],
    'invokables' => [
         // Load adapter
        'ImgMan\Adapter\Imagick' => 'ImgMan\Core\Adapter\ImagickAdapter',
        'ImgMan\ResolverDefault' => 'ImgMan\Storage\Adapter\FileSystem\Resolver\ResolverDefault'
    ],
    \\ ...

];
```

You can set only one storage configuration. Configure storage (e.g Mongo) where to save the images:

```
return [
    \\ ...
    'imgman_mongodb' => [
        'MongoDb' => [
            'database' => 'imgManStorage'
        ]
    ],
    'imgman_adapter_mongo' => [
        'Storage' => [
            'collection' => 'image_test',
            'database' => 'MongoDb'
        ]
    ],
    \\ ...
 ];
```

E.g aws configuration:

```
return [
    \\ ...
       'imgman_amazon_client' => [
           'AmazonS3Client' => [
               'secret' => 'testSecret',
               'key' => 'testKey',
               'region' => 'testRegion',
               'version' => 'latest',
               'name' => 'S3'
           ],
           'AmazonCloudFrontClient' => [
               'secret' => 'testSecret',
               'key' => 'testKey',
               'region' => 'testRegion',
               'version' => 'latest',
               'name' => 'CloudFront'
           ]
       ],
       'imgman_amazon_s3_service' => [
           'S3Service' => [
               'client' => 'AmazonS3Client',
               'bucket' => 'test'
           ]
       ],
       'imgman_amazon_cloud_front_service' => [
           'CloudFrontService' => [
               'client' => 'AmazonCloudFrontClient',
               'domain' => 'testdomain'
           ]
       ],
       'imgman_amazon_adapter' => [
           'Storage' => [
               's3_client' => 'S3Service',
               'cloud_front_client' => 'CloudFrontService',
               'name_strategy' => 'default',
               'name_strategy_config' => [
                   'prefix' => 'test'
               ]
           ]
       ]
    \\ ...
 ];
```

E.g filesystem configuration:

```
return [
    \\ ...
        'imgman_adapter_filesystem' => [
            'Storage' => [
                'path' => DIR_PATH_,
                'resolver' => 'ImgMan\ResolverDefault'
            ],
        ]
    \\ ...
 ];
```

Configure ImgMan service with the storage, helper, adapter and the various operations to attach on the renditions:

```
return [
    \\ ...
    'imgman_services' => [
        'ImgMan\Service\First' => [
            'adapter' => 'ImgMan\Adapter\Imagick',
            'storage' => 'Storage',
            'helper_manager' => 'ImgMan\Operation\HelperPluginManager',
            'renditions' => [
                'thumb' => [
                    'resize' => [
                        'width'  => 200,
                        'height' => 200,
                    ],
                    'compression' => [
                        'compression' => 90,
                        'compressionQuality' => 70,
                    ]
                ],
                'thumbmaxi' => [
                    'resize' => [
                        'width'  => 400,
                        'height' => 400,
                    ],
                ],
            ],
        ],
    ],
    \\ ...
 ];
```

Usage
-----

[](#usage)

Now we get the IgmMan service, load a picture from file stream (filesystem) and save it in 3 renditions (original, thumb, and thumbmaxi).

```
$imgMan = $this->getServiceLocator()->get('ImgMan\Service\First');
$image = new ImgMan\Image\Image(__DIR__. '/../../../name_image.png'); //the path can be also a URL
$imgMan->grab($image, '/first/name/identifier/');
```

Finally, we can recover the image rendition we desire this way:

```
$imageOriginal = $imgMan->get('/first/name/identifier/', 'original');
$imageThumb = $imgMan->get('/first/name/identifier/', 'thumb');
$imageThumbMaxi = $imgMan->get('/first/name/identifier/', 'thumbmaxi');
```

---

[![Analytics](https://camo.githubusercontent.com/1bd03423607e6596cdfe506226d0959049a66ad6a00842c2486dc35cd8112224/68747470733a2f2f67612d626561636f6e2e61707073706f742e636f6d2f55412d34393635373137362d332f696d676d616e)](https://github.com/igrigorik/ga-beacon)

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 70.9% 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 ~52 days

Recently: every ~1 days

Total

13

Last Release

3645d ago

Major Versions

v0.6.0 → v1.0.02016-05-13

PHP version history (2 changes)0.1.0PHP &gt;=5.4.0

v0.5.0PHP &gt;=5.5.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120051?v=4)[Leo Di Donato](/maintainers/leodido)[@leodido](https://github.com/leodido)

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

---

Top Contributors

[![visa4](https://avatars.githubusercontent.com/u/3627018?v=4)](https://github.com/visa4 "visa4 (107 commits)")[![leodido](https://avatars.githubusercontent.com/u/120051?v=4)](https://github.com/leodido "leodido (27 commits)")[![leogr](https://avatars.githubusercontent.com/u/3390997?v=4)](https://github.com/leogr "leogr (17 commits)")

---

Tags

imagegdimagickresizeimagespicturescropStreamspicturerotatefigureimage-magickimage managerrenditionsfit infit outfigures

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[stefangabos/zebra_image

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

141110.4k6](/packages/stefangabos-zebra-image)[intervention/image-symfony

Symfony Integration of Intervention Image

1066.8k](/packages/intervention-image-symfony)

PHPackages © 2026

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