Laravel使用intervention image包上传、剪裁图片

下面由laravel教程栏目给大家介绍laravel 使用 intervention image 包上传、剪裁图片的方法,希望对需要的朋友有所帮助!

Laravel使用intervention image包上传、剪裁图片

1、通过 composer 安装 composer intervention/image

2、修改 config/app.php 文件,添加 $providers$aliases
‘InterventionImageImageServiceProvider’

‘Image’ => ‘InterventionImageFacadesImage’

Cutout老照片上色 Cutout老照片上色

Cutout.Pro推出的黑白图片上色

Cutout老照片上色 20 查看详情 Cutout老照片上色

1、By default Intervention Image uses PHP’s GD library extension to process all images. If you want to switch to Imagick, you can pull a configuration file into your application by running on of the following artisan command.

Publish configuration in Laravel 5

$ php artisan vendor:publish –provider=”InterventionImageImageServiceProviderLaravel5″

Handling image uploads in Laravel

In a Laravel application it is also possible to pass an uploaded file directly to the make method.

Creating Image from File Upload in Laravel

// resizing an uploaded fileImage::make(Input::file('photo'))->resize(300, 200)->save('foo.jpg')

以上就是Laravel使用intervention image包上传、剪裁图片的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/353408.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫

关于作者

上一篇 2025年11月5日 23:29:45
下一篇 2025年11月5日 23:31:04

相关推荐

发表回复

登录后才能评论
关注微信