這篇文章將為大家詳細講解有關(guān)Laravel如何使用intervention image包上傳、剪裁圖片,小編覺得挺實用的,因此分享給大家做個參考,希望大家閱讀完這篇文章后可以有所收獲。
創(chuàng)新互聯(lián)堅持“要么做到,要么別承諾”的工作理念,服務領域包括:成都網(wǎng)站制作、網(wǎng)站建設、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務,滿足客戶于互聯(lián)網(wǎng)時代的宜君網(wǎng)站設計、移動媒體設計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡建設合作伙伴!
1、通過 composer 安裝 composer intervention/image
2、修改 config/app.php 文件,添加 $providers
和 $aliases
'Intervention\Image\ImageServiceProvider'
'Image' => 'Intervention\Image\Facades\Image'
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.
$ php artisan vendor:publish --provider="Intervention\Image\ImageServiceProviderLaravel5"
In a Laravel application it is also possible to pass an uploaded file directly to the make method.
// resizing an uploaded file Image::make(Input::file('photo'))->resize(300, 200)->save('foo.jpg')
關(guān)于“Laravel如何使用intervention image包上傳、剪裁圖片”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,使各位可以學到更多知識,如果覺得文章不錯,請把它分享出去讓更多的人看到。
當前題目:Laravel如何使用interventionimage包上傳、剪裁圖片
文章起源:http://vcdvsql.cn/article4/gjeoie.html
成都網(wǎng)站建設公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站營銷、做網(wǎng)站、網(wǎng)站制作、、面包屑導航、ChatGPT
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)