Today I have the same problem in Laravel 5.5 when using the Intervention package to resize images in the order below:
Image::make($image_tmp)->save($image_path);
I do not have access to the php.ini on the server, and the server will need time to update, therefore the temporarily increased memory limit in the function itself in my Controller file, as shown below:
In ImagesController.php file: -
public function addImage(Request $request){ // Temporarily increase memory limit to 256MB ini_set('memory_limit','256M'); $extension = Input::file('image')->getClientOriginalExtension(); $fileName = rand(111,99999).'.'.$extension; $image_path = 'images/'.$fileName; $image_tmp = Input::file('image'); Image::make($image_tmp)->resize(1182, 1506)->save($image_path); }
Hope this helps someone in the future!
source share