PHP code example of hisuley / image

1. Go to this page and download the library: Download hisuley/image 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/ */

    

hisuley / image example snippets


Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'));

Image::make('/uploads/photo.jpg',array(
	'width' => 300,
	'height' => 300,
	'grayscale' => true
))->save('/path/to/the/thumbnail.jpg');

$thumbnail = Image::open('/uploads/photo.jpg')
			->thumbnail(new Imagine\Image\Box(300,300));

$thumbnail->effects()->grayscale();
	
$thumbnail->save('/path/to/the/thumbnail.jpg');

'Folklore\Image\ImageServiceProvider',

'Image' => 'Folklore\Image\Facades\Image',
html
<img src="<?=Image::url('/uploads/photo.jpg',300,300,array('crop','grayscale'))
bash
$ php artisan vendor:publish --provider="Folklore\Image\ImageServiceProvider"

app/config/image.php