1. Go to this page and download the library: Download buglinjo/laravel-webp 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/ */
return [
/*
|--------------------------------------------------------------------------
| Default Quality
|--------------------------------------------------------------------------
|
| This is a default quality unless you provide while generation of the WebP
|
*/
'default_quality' => 70,
/*
|--------------------------------------------------------------------------
| Default Driver
|--------------------------------------------------------------------------
|
| This is a default image processing driver. Available: ['cwebp', 'php-gd']
|
*/
'default_driver' => 'php-gd',
/*
|--------------------------------------------------------------------------
| Drivers
|--------------------------------------------------------------------------
|
| Available drivers which can be selected
|
*/
'drivers' => [
/*
|--------------------------------------------------------------------------
| Cwebp Driver
|--------------------------------------------------------------------------
|
| If you choose cwebp driver it is