yaroslawww / laravel-multisize-image
Crop multiple sizes image while downloading
1.2.0
2020-11-07 14:34 UTC
Requires
- php: ^7.2
- illuminate/http: ^5.8.15|^6.0|^7.0|^8.0
- illuminate/support: ^5.8.15|^6.0|^7.0|^8.0
- intervention/image: ^2.5
Requires (Dev)
- mockery/mockery: ^1.2
- php-mock/php-mock-phpunit: ^2.5
- phpunit/phpunit: ^8.2
- symfony/var-dumper: ^4.3
This package is auto-updated.
Last update: 2024-12-07 23:17:25 UTC
README
Installation
You can install the package via composer:
composer require yaroslawww/laravel-multisize-image
Usage
/** @var SavedImageData $result */ $result = (new AvatarManager($user))->replaceOrSave($request->new_avatar); if(!empty($result->getSizes())) { $user->avatar = $result->getName(); $user->save(); }
Testing
composer test
Security
If you discover any security related issues, please email yaroslav.georgitsa@gmail.com instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.