PHP code example of soumen-dey / laravel-image

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

    

soumen-dey / laravel-image example snippets

 php
Soumen\Image\ImageServiceProvider::class
 php
'Image' => Soumen\Image\Facades\Image::class
 bash
$ php artisan vendor:publish --provider="Soumen\Image\ImageServiceProvider"
 php
$image = (new Image($file))->process()->store();
 php
$image = new Image($file);
$image->setQuality(90); // the jpeg image quality, default is 50
$image->setEncoding('png'); // default is jpeg
$image->setStorage('images'); // set the storage
$image->generateThumbnail(); // generates the thumbnail
$image->encode();
$image->store();
$image->process()