Download the PHP package poznet/imageoptimbundle without Composer
On this page you can find all versions of the php package poznet/imageoptimbundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download poznet/imageoptimbundle
More information about poznet/imageoptimbundle
Files in poznet/imageoptimbundle
Package imageoptimbundle
Short Description Symfony Bundle - Wrapper for tinyjpg
License GPL-3.0
Homepage https://github.com/poznet/imageoptimbundle
Informations about the package imageoptimbundle
Image Optimization Bundle ( minify - tinyjpg.com)
Bundle for Symfony 2/3
Main idea is to use tinify API to shrink images, that are already stored in server. Shrinking when uploading images takes too much time, so it's better to do that with commands firedup in cron
Usage
Bundle adds new commands (for use with cron for example):
console image:optim:scan
- searches for images in given dirs
console image:optim:minify
- minify images (default is 20 images per 1 run - can be overwriten by argument)
console image:optim:stats
- writes statistics info
console image:optim:truncate
- removes all images data from database
Installation
Install with composer
composer require poznet/imageoptimbundle
create databes structures
Add API key in parameters.yml
Define paths in parameters.yml All paths should be realive to main all dir (1 above app).
This parameters are used in Finder() Component as in() and exclude()
Other
Bundle uses custom events , so it can be easily extended
Events :
- image.add
- image.minify
Both takes Poznet\ImageOptimBundle\Event\ImageEvent class as event.