g4t/laravel-image-resizing

0.0.1 2021-12-12 13:10 UTC

This package is auto-updated.

Last update: 2024-09-10 14:18:27 UTC


README

您可以在上传图片时更改图片大小

这里应该放您的描述。请查看 contributing.md 以查看待办事项列表。

安装

通过 Composer

$ composer require g4t/laravel-image-resizing
现在使用此命令发布 ImageResizing.php
$ php artisan vendor:publish --provider=g4t\ImageResizing\ImageResizingServiceProvider

用法

in folder `config` You will find `ImageResizing.php`
you will find some examples there
you can define:
Image `height`
Image `width`
`path` to save images
`save_orginal` to save orginal image or not
`full_url` to return full url or not
`base_url` to use with `full_url`

在控制器中使用

use g4t\ImageResizing\Upload;
.
.
.
return Upload::file($request->image, 'small');

在我们的例子中,small 可以在 ImageResizing.php 中找到

许可证

MIT。有关更多信息,请参阅 许可证文件