yaroslawww/laravel-multisize-image

Crop multiple sizes image while downloading

1.2.0 2020-11-07 14:34 UTC

This package is auto-updated.

Last update: 2024-10-07 22:58:44 UTC


README

Software License Build Status StyleCI Quality Score Code Coverage PHP Version Packagist Version

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.