maciekpaprocki / imageprofessor
Independent image processor with routing and caching
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/maciekpaprocki/imageprofessor
Requires
- symfony/filesystem: ~2.3
Requires (Dev)
- imanee/imanee: ^1.2
- phpunit/phpunit: 4.7
- silex/silex: ~1.1
- symfony/finder: ~2.3
This package is not auto-updated.
Last update: 2025-09-28 00:34:38 UTC
README
#Easy image processor microservice.
Unfortunately most of the image processors built-in in standard cms's are not good enough for more advanced usecases. In cases like that you want to use microservice to show process your images in more gentle way. =
Instalation
composer install maciekpaprocki/imageprofessor
Be sure that you have imagemagick(preferred)||GD installed on your server.
Usage
Define image processor name, paths and transformation.
use ImageProfessor\ImageProfessor; var $thumbnail = New ImageProfessor('thumbnail','assets/*',function($image){ return $image->thumbnail(200,200) ->placeImage('thisisyourwatermarkimage.png'); },'cache');
Because we are using Imanee package for image tranformation, you have whole array of possibilities.
To get link to image just use:
echo $thumbnail->getUrl('path/to.jpg');
to process all images use (require app autoloader):
$thumbnail->process();
to process one image use (require app autoloader):
$thumbnail->process('path/to.jpg');
Future api
Bescause it's extremally annoying to each time get all variables for one file it's better to just use