1. Go to this page and download the library: Download crd2i/image-bundle library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
crd2i / image-bundle example snippets
php
class ImageController extends Controller
{
public function userAction($user, $size) {
$resize = $this->get('image_resizer')
->resize(
$user->getImageFile(),
$user->getImageFile($size),
new ImageSize($size, $size),
ImageResizer::RESIZE_TYPE_CROP
);
}
}