Questions tagged [intervention]

Intervention Image is an open source PHP image handling and manipulation library. It provides an easier and expressive way to create, edit, and compose images and currently supports the two most common image processing libraries GD Library and Imagick.

Intervention Image is an open source PHP image handling and manipulation library. It provides an easier and expressive way to create, edit, and compose images and currently supports the two most common image processing libraries GD Library and Imagick.

The class is written to make PHP image manipulating more easier and expressive. No matter if you want to create image thumbnails, watermarks or format large image files Intervention Image helps you to manage every task in an easy way with as little lines of code as possible.

The library follows the FIG standard PSR-2 to ensure a high level of interoperability between shared PHP code and is fully unit-tested.

456 questions
8
votes
3 answers

League/Flysystem fstat() expects parameter 1 to be resource, object given

I am in the process of upgrading a project from Laravel 5 to 5.1. One package that needed to be updated was League\Flysystem. I am using Intervention\Image to resize an image and then Flysystem to save it to S3. The code below was working with 5.0…
NightMICU
  • 9,000
  • 30
  • 89
  • 121
7
votes
3 answers

Unable to upload an image in Laravel 5.4

Using Laravel 5.4, I'm tring to setup a form where a user can enter a food name and its image. While trying to upload a PNG or JPG image, I get the following Validation Error: The image must be an image. If I remove the validation for image, I get…
anonym
  • 4,460
  • 12
  • 45
  • 75
7
votes
4 answers

Unable to init from given url in intervention/image": "^2.3

I want to save the images from google plus as below url it is work as well in local computer but I got below error when upload to ubuntu14. $image =…
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
7
votes
4 answers

Quality must range from 0 to 100 - Intervention Laravel 5.x

I'm using intervention/image 2.3. When I try to upload an image I got the following error : InvalidArgumentException in AbstractEncoder.php line 212 Quality must range from 0 to 100 Below is my code for that : $file =…
Vineet
  • 4,525
  • 3
  • 23
  • 42
7
votes
2 answers

Laravel Image Intervention resize quality loss

In my Laravel web-application I make use of the Intervention Image library. I'm saving three versions of the uploaded image: 'original', '500_auto' and a custom size image. $image = Image::make(Input::file('file'); // Save the orignal…
kipzes
  • 694
  • 2
  • 10
  • 27
7
votes
2 answers

laravel 5 ->getRealPath() doenst show correct value

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…
Christophvh
  • 12,586
  • 7
  • 48
  • 70
7
votes
1 answer

Intervention Image rounded corners upload

I'm trying to upload my files as circles, but I can't make it work. I've seen some topics about applying a mask to the image, but when I apply the mask it takes way to long and the server shuts the request down. I'm using the Intervention Image…
guidsen
  • 2,333
  • 6
  • 34
  • 55
6
votes
1 answer

Image intervention adding black noise to the background when saving a PNG as JPG

I'm currently using intervention/image to resize images and save them as JPG. I have the same code running locally in Windows and remotely in Ubuntu 20.20. In Windows it does the conversion PNG to JPG converting the transparent background into…
Inigo EC
  • 2,178
  • 3
  • 22
  • 31
6
votes
3 answers

How to encode jpeg/jpg to webp in laravel

I'm working with laravel 7 and using intervention/image to store images. However, I want to encode and store images as webp, I'm using the following code but it is not encoding the image in webp rather it is storing in the original format. Can you…
Danish
  • 343
  • 1
  • 8
  • 21
6
votes
1 answer

How to fake image upload for testing with Intervention image package using Laravel

I have a test asserting that images can be uploaded. Here is the code... // Test $file = UploadedFile::fake()->image('image_one.jpg'); Storage::fake('public'); $response = $this->post('/api/images', [ 'images' => $file ]); Then in controller i…
Rakesh K
  • 1,290
  • 1
  • 16
  • 43
6
votes
4 answers

Laravel Intervention Unable to init from given binary data for WEBP type files

I am trying to upload the binary image to the storage using Laravel Intervention Image but it gives me error as Unable to init from given binary data. I am using this code $image = base64_decode($postData['image']); $destinationPath =…
RAUSHAN KUMAR
  • 5,846
  • 4
  • 34
  • 70
6
votes
3 answers

Laravel Intervention Saving Image in a specific disk

I'm trying to use Intervention to resize an image, then save it in a disk that I've defined, but I can't get it to work. Using public_folder is saving it in a folder in the root of my app called /public I've created a new disk: 'disks' => [ …
kurtfoster
  • 353
  • 3
  • 14
6
votes
4 answers

Call to undefined method Intervention\Image\Facades\Image::make()

I upgraded from Laravel 4.2 to Laraveld5.3 with intervention/image : "^2.3", if (Input::hasFile('logo')) { $path = public_path()."/assets/admin/layout/img/"; File::makeDirectory($path, $mode = 0777, true, true); $image …
DMS-KH
  • 2,669
  • 8
  • 43
  • 73
5
votes
3 answers

Laravel image intervention resize and put in storage

When a user uploads a picture I want to store it in multiple formats. My code for handling the image: $img = Image::make($file)->encode('png'); if($img->width()>3000){ $img->resize(3000, null, function ($constraint) { …
Sven van den Boogaart
  • 11,833
  • 21
  • 86
  • 169
5
votes
3 answers

Laravel 5.2: Class 'Intervention\Image\ImageServiceProvider' not found

I am trying to integrate Intervention Image into my project. I have followed the guide, used a shitton of other tutorials and no matter what I do, I keep getting the same error: Class 'Intervention\Image\ImageServiceProvider' not found It is…
Somentus
  • 95
  • 2
  • 11
1
2
3
30 31