Kohana image lib wrapper for yii 2
Image manipulations (resize, crop, watermark, etc), (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-dist webvimark/image "*"
or add, (*4)
"webvimark/image": "*"
to the require section of your composer.json
file., (*5)
In your config/web.php, (*6)
'modules'=>[ ... 'migrations'=>[ 'class'=>'webvimark\modules\migrations\MigrationModule' ], ... ],
In you config/console.php, (*7)
... 'controllerMap'=>[ 'migrate'=>[ 'class'=>'webvimark\modules\migrations\components\MigrateController', ], ], ...
Include your desired modules in config/console.php, (*8)
\webvimark\image\Image::factory($pathFromFile)->resize(500, 300)->save($pathToFile);