PHP code example of danihidayatx / image-optimizer
1. Go to this page and download the library: Download danihidayatx/image-optimizer 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/ */
danihidayatx / image-optimizer example snippets
use Filament\Forms\Components\FileUpload;
FileUpload::make('attachment')
->image()
->optimize('webp'),
use Filament\Forms\Components\FileUpload;
FileUpload::make('attachment')
->image()
->optimize('webp', 85),
use Filament\Forms\Components\SpatieMediaLibraryFileUpload;
SpatieMediaLibraryFileUpload::make('attachment')
->image()
->optimize('webp', 85),