百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

laravel-imageup

> 后端框架
开源

使用 Intervention image 为 Laravel eloquent 模型自动上传、调整大小和裁剪图像和文件

770 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

使用 Intervention image 为 Laravel eloquent 模型自动上传、调整大小和裁剪图像和文件

Laravel ImageUp qcod/laravel-imageup 是一个 trait,它为图像功能提供自动上传、调整大小和裁剪,并提供大量自定义选项。

模型

> Make sure to run `php artisan storage:link` to see the images from public storage disk

That's it, with above setup when ever you hit store method with post request and if `cover` or `avatar` named file is present on request() it will be auto uploaded.  

## Upload Field options

ImageUp gives you tons of customization on how the upload and resize will be handled from defined field options, following are the things you can customize:

php [ // 上传后调整图片宽度 'width' => 200,

        // 上传后调整图片高度
        'height' => 100,
        
        // 设置为 true 可裁剪图片,并可传递 arr [x,y] 坐标进行裁剪。
        'crop' => true,
        
        // 要上传到的磁盘,默认为 config('imageup.upload_disk')
        'disk' => 'public',
        
        // 上述磁盘上的文件夹路径,默认为 config('imageup.upload_directory')
        'path' => 'avatars',
        
        // 如果图片字段为空,则使用占位图
        'placeholder' => '/images/avatar-placehold

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPeloquentimageimage-cropimage-resize

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架