intervention

Laravel 5 intervention image upload multiple size

独自空忆成欢 提交于 2019-12-08 10:52:05
问题 I am using laravel 5 and intervention, and would like to store multiple sizes of a image when it is uploaded via a form. Can anybody guide me 回答1: So i don't know what you already did. So let's start from the beginning. First of all you need the Intervention Library. So switch to your main Folder (containing your composer.json file) And type composer.phar require intervention/image Or just add "intervention/image": "~2.1" to your require array in composer.json. ( And do a composer update

How to add watermark image in laravel 5.2 in intervention package?

不想你离开。 提交于 2019-12-08 09:37:34
问题 I am using laravel 5.2 framework and i am using intervention package of laravel that runs fine for me. Now here i face one problem i don't know what i amd doing wrong. Please help:- $myimage = Image::make(storage_path('app/images/test1.jpg')); //Suppose $imyimage width is 3024 and height is 2016 $actualwidth = 3024; $actualheight = 2016; Now, when i tried these sizes 3024 * 2016 pixel then watermark is not visible while when i zoom the image then it is visible Now suppose i have width and

Argument 1 passed must be an instance of App\Request, instance of Illuminate\Http\Request given

点点圈 提交于 2019-12-07 14:24:58
问题 I have created a method in my User model to upload a poster (with intervention)for the user: /** * Store user's poster. */ public static function storePoster(Request $request) { if($request->hasFile('posterUpload')){ $poster = $request->file('posterUpload'); $filename = time() . '.'. $poster->getClientOriginalExtension(); Image::make($poster)->resize(356,265)->save(public_path('/uploads/posters/'.$filename)); $check = Setting_user::where([ ['user_id', '=' ,Auth::user()->id], ['setting_id','='

Laravel 5.2 Intervention Image 500 Server Error

喜夏-厌秋 提交于 2019-12-07 00:36:56
问题 When I upload big images (4.2 MB) Intervention Image is throwing 500 Error... private function resizeImage($path, $imgName){ $sizes = getimagesize($path.$imgName); if($sizes[0] > $sizes[1]){ ImageManagerStatic::make($path.$imgName)->fit(920,474)->insert(public_path() . "/uploads/applications/watermark.png",'bottom-right', 30, 30)->save($path."1_".$imgName); }else{ ImageManagerStatic::make($path.$imgName)->heighten(474)->insert(public_path() . "/uploads/applications/watermark.png",'bottom

Laravel 5.2 Intervention Image 500 Server Error

∥☆過路亽.° 提交于 2019-12-05 03:21:49
When I upload big images (4.2 MB) Intervention Image is throwing 500 Error... private function resizeImage($path, $imgName){ $sizes = getimagesize($path.$imgName); if($sizes[0] > $sizes[1]){ ImageManagerStatic::make($path.$imgName)->fit(920,474)->insert(public_path() . "/uploads/applications/watermark.png",'bottom-right', 30, 30)->save($path."1_".$imgName); }else{ ImageManagerStatic::make($path.$imgName)->heighten(474)->insert(public_path() . "/uploads/applications/watermark.png",'bottom-right', 30, 30)->save($path."1_".$imgName); } ImageManagerStatic::make($path.$imgName)->fit(440,226)->save(

PHP Fileinfo extension must be installed/enabled to use Intervention Image

半城伤御伤魂 提交于 2019-12-04 14:13:07
问题 I've used intervention image package in Laravel 5 project. It is working in local server. Now when I uploaded in shared server via cpanel, I am getting error: MissingDependencyException in ImageManager.php line 123: PHP Fileinfo extension must be installed/enabled to use Intervention Image. Server has PHP Version 5.6.19 I went through requires ext-fileinfo. How do I add that into my composer.json file? but couldn't get solution. Where is the php.ini file inside my cpanel? 回答1: You can enable

Image source not readable in Laravel 5.2 - Intervention Image

社会主义新天地 提交于 2019-12-03 11:36:51
I have a small problem concerning the resizing process of a given image, I am trying to submit a form containing an input type -->file<-- I was able to upload a picture without resizing it, after that I decided to resize that image so I installed the Intervention Image Library using: composer require intervention/image then I integrated the library into my Laravel framework Intervention\Image\ImageServiceProvider::class 'Image' => Intervention\Image\Facades\Image::class and finally I configured it like following php artisan vendor:publish --provider="Intervention\Image

Intervention Image: Save image directly from an url with original file name and ext?

谁都会走 提交于 2019-12-03 02:29:38
How to get the filename, when taking image from a remote server? And how to save with original size and filename? // Take remote image $img = Image::make('http://image.info/demo.jpg'); // how to save in the img/original/demo.jpg $img->save(????); I use Intervention, ( http://image.intervention.io/api/make ) to build CakePHP 3 image Behavior, I want to provide an easy uploading from remote servers, and keep the original image as a source for future manipulation. EDIT I ask, is there the Intervention Image method that returns the name of the file, when taken from the remote server. I know php

laravel 5 ->getRealPath() doenst show correct value

那年仲夏 提交于 2019-12-01 16:32:51
问题 On my local development I use the code shown below, which works perfect, but when I uploaded the site to my shared hosting everything worked fine except my file upload. I already determined that the problem is involving ->getRealPath() , when I dd(); that I get this path: /data/sites/web/christophvhbe/tmp Which doesn't exist on my hosting. But I found where the temporary images are stored on my hosting, which is in the tmp/ located here: http://gyazo.com/e0199718324119109a4ff66321414e12. How

Getting Error: NotReadableException in AbstractDecoder.php line 302

半腔热情 提交于 2019-11-30 09:55:13
问题 I am following a turtorial on how to save photos and resize them as thumbnails using PHP, Laravel 5.1, MySQL, InterventionImage plugin, and am getting the following error when I try to add photos: NotReadableException in AbstractDecoder.php line 302: Image source not readable It seems that the problem is happening in the Photo code below in the makeThumbnail method. The original photo is stored in my flyers/photo folder, but the thumbnail file is never created and the photo is not stored in