Download the PHP package hrevert/ht-img-module without Composer
On this page you can find all versions of the php package hrevert/ht-img-module. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download hrevert/ht-img-module
More information about hrevert/ht-img-module
Files in hrevert/ht-img-module
Package ht-img-module
Short Description Image manipulation module for Zend Framework 2
License MIT
Homepage https://github.com/hrevert/HtImgModule
Informations about the package ht-img-module
HtImgModule
This module simplifies image manipulation for Zend Framework. This module integrates zf2/zf3 with Imagine, the most amazing Image manipulation library for PHP.
Installation
composer require hrevert/ht-img-module
- Register
HtImgModule
as module inconfig/application.config.php
- Copy the file located in
vendor/hrevert/ht-img-module/config/ht-img-module.global.php
toconfig/autoload
and change the values as you wish
Basic Usage
First, you need to create a filter service, my_thumbnail
in /module/Application/config/module.config.php
Now, you can get image from view templates like:
Alternatively, you can:
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
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
The officially documentation is available in the docs/ directory:
Acknowledgements
HtImgModule is inspired by AvalancheImagineBundle and LiipImagineBundle.
All versions of ht-img-module with dependencies
zendframework/zend-mvc Version ^2.7.10 || ^3.0
zendframework/zend-servicemanager Version ^2.7.6 || ^3.1
zendframework/zend-modulemanager Version ^2.6
zendframework/zend-stdlib Version ^2.7 || ^3.0
zendframework/zend-http Version ^2.5
zendframework/zend-eventmanager Version ^2.7 || ^3.0
imagine/imagine Version ^0.7.1
symfony/http-foundation Version ~3.4