PHPackages                             hrevert/ht-img-module - 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. hrevert/ht-img-module

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

hrevert/ht-img-module
=====================

Image manipulation module for Zend Framework 2

0.6.0(8y ago)1729.6k↓80.6%15[5 issues](https://github.com/hrevert/HtImgModule/issues)[2 PRs](https://github.com/hrevert/HtImgModule/pulls)2MITPHPPHP ^5.6 || ^7.0

Since Mar 2Pushed 5y ago8 watchersCompare

[ Source](https://github.com/hrevert/HtImgModule)[ Packagist](https://packagist.org/packages/hrevert/ht-img-module)[ Docs](https://github.com/hrevert/HtImgModule)[ RSS](/packages/hrevert-ht-img-module/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (16)Versions (26)Used By (2)

HtImgModule
===========

[](#htimgmodule)

[![Master Branch Build Status](https://camo.githubusercontent.com/1cbfaede5328b52254d2dc19d71128f19798debc08ad54abe04f4020af689765/68747470733a2f2f6170692e7472617669732d63692e6f72672f687265766572742f4874496d674d6f64756c652e706e673f6272616e63683d6d6173746572)](http://travis-ci.org/hrevert/HtImgModule)[![Latest Stable Version](https://camo.githubusercontent.com/326aacb455f2dfc5511c5b8bc4ee7bc426bd223b304f1d7efcb5beb50abe252c/68747470733a2f2f706f7365722e707567782e6f72672f687265766572742f68742d696d672d6d6f64756c652f762f737461626c652e706e67)](https://packagist.org/packages/hrevert/ht-img-module)[![Latest Unstable Version](https://camo.githubusercontent.com/2e0895a2dd629910fedce4935dd77742ec43402a11f7cd1515cc08a436172ddb/68747470733a2f2f706f7365722e707567782e6f72672f687265766572742f68742d696d672d6d6f64756c652f762f756e737461626c652e706e67)](https://packagist.org/packages/hrevert/ht-img-module)[![Total Downloads](https://camo.githubusercontent.com/14990b79587400b5c88535861577e75099df9c818702cbbf706662774a0b9c94/68747470733a2f2f706f7365722e707567782e6f72672f687265766572742f68742d696d672d6d6f64756c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/hrevert/ht-img-module)[![Scrutinizer](https://camo.githubusercontent.com/f4279f93985292510e7a4c5540eeebe631ca73e74528cc00da53866782888db7/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f687265766572742f4874496d674d6f64756c652f6261646765732f7175616c6974792d73636f72652e706e673f733d63396264356166313336633265353830636637363064313966336361373261653533626238613032)](https://scrutinizer-ci.com/g/hrevert/HtImgModule/)[![Code Coverage](https://camo.githubusercontent.com/27d7757885bbc2e74e7261475c48e8d4ee468563b4b1ba3f58fc32bdf66d65f0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f687265766572742f4874496d674d6f64756c652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/hrevert/HtImgModule/?branch=master)

This module simplifies image manipulation for Zend Framework. This module integrates zf2/zf3 with [Imagine](https://github.com/avalanche123/Imagine), the most amazing Image manipulation library for PHP.

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

[](#installation)

- `composer require hrevert/ht-img-module`
- Register `HtImgModule` as module in `config/application.config.php`
- Copy the file located in `vendor/hrevert/ht-img-module/config/ht-img-module.global.php` to `config/autoload` and change the values as you wish

Basic Usage
-----------

[](#basic-usage)

First, you need to create a filter service, `my_thumbnail` in `/module/Application/config/module.config.php`

```
return [
    'htimg' => [
        'filters' => [
            'my_thumbnail' => [ // this is  filter service
                'type' => 'thumbnail', // this is a filter loader
                'options' => [  // filter loader passes these options to a Filter which manipulates the image
                    'width' => 100,
                    'height' => 100,
                    'format' => 'jpeg' // format is optional and defaults to the format of given image
                ]
            ]
        ]
    ]
];
```

Now, you can get image from view templates like:

```

```

Behind the scenes, the module applies the filter to the image on the first request and then caches the image to the web root. On the next request, the cached image would be served directly from the file system.

Theory of Operation
-------------------

[](#theory-of-operation)

Whenever, you call a filter service like `my_thumbnail` from view template, the view helpers(htImgUrl and htDisplayImage) check if the cached image exists. If the cached image exists, it just returns the url to cached image. Else, it return the url where the image is displayed. Also a new cached image is created in the web root!

Documentation
-------------

[](#documentation)

The officially documentation is available in the [docs/](https://github.com/hrevert/HtImgModule/tree/master/docs) directory:

Acknowledgements
----------------

[](#acknowledgements)

HtImgModule is inspired by [AvalancheImagineBundle](https://github.com/avalanche123/AvalancheImagineBundle) and [LiipImagineBundle](https://github.com/liip/LiipImagineBundle).

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance14

Infrequent updates — may be unmaintained

Popularity35

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94.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 ~79 days

Recently: every ~138 days

Total

20

Last Release

2980d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.4

v0.5.0PHP ^5.6 || ^7.0

### Community

Maintainers

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

---

Top Contributors

[![ojhaujjwal](https://avatars.githubusercontent.com/u/4995501?v=4)](https://github.com/ojhaujjwal "ojhaujjwal (201 commits)")[![mrVrAlex](https://avatars.githubusercontent.com/u/633883?v=4)](https://github.com/mrVrAlex "mrVrAlex (9 commits)")[![atukai](https://avatars.githubusercontent.com/u/308995?v=4)](https://github.com/atukai "atukai (2 commits)")[![maxvoronov](https://avatars.githubusercontent.com/u/8292606?v=4)](https://github.com/maxvoronov "maxvoronov (1 commits)")

---

Tags

ZendFrameworkmodulezf2zf3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hrevert-ht-img-module/health.svg)

```
[![Health](https://phpackages.com/badges/hrevert-ht-img-module/health.svg)](https://phpackages.com/packages/hrevert-ht-img-module)
```

PHPackages © 2026

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