agencetwogether / filament-optimize-fileupload
Save your image in another format with eventually a custom quality compression directly in FileUpload component
Package info
github.com/agencetwogether/filament-optimize-fileupload
pkg:composer/agencetwogether/filament-optimize-fileupload
Fund package maintenance!
Requires
- php: ^8.2
- filament/forms: ^4.0|^5.0
- intervention/image: ^3.11
- spatie/laravel-package-tools: ^1.15.0
Requires (Dev)
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0|^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
README
Save your image in another format with eventually a custom quality compression directly in FileUpload component
Installation
You can install the package via composer:
composer require agencetwogether/filament-optimize-fileupload
Usage
After installation, just call ->optimize('webp', '50') in one of your FileUpload component in your form to
automatically save your image with a desired format
FileUpload::make('image') ->image() ->optimize('webp')
You can choose any image format and eventually customizing the quality with second parameter.
FileUpload::make('image') ->image() ->optimize(format: 'jpg', quality: '40')
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.