PHP code example of karagulle / image-resizer

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

    

karagulle / image-resizer example snippets


composer 

composer install

 Karagulle\ImageResizer\ImageResizerProvider::class,

'ImageResizer' => Karagulle\ImageResizer\Facades\ImageResizerFacade::class

php artisan vendor:publish --provider="Karagulle\ImageResizer\ImageResizerProvider" --tag="config" --force

php artisan storage:link

<img src="{{ ImageResizer::open('mountain.jpeg')}}" width="200" height="200" alt="">

<img src="{{ ImageResizer::open('mountain.jpeg', 300, 400)}}" width="200" height="200" alt="">

<img src="{{ ImageResizer::open('mountain.jpeg', 300, 400, 'webp')}}" width="200" height="200" alt="">