When I upload big images (4.2 MB) Intervention Image is throwing 500 Error...
private function resizeImage($path, $imgName){
$sizes = getimagesize($path.
Today I got the same issue in Laravel 5.5 while using Intervention Package for resizing images exactly at below code:
Image::make($image_tmp)->save($image_path);
I don't have access to php.ini file in server and server will take time for update so temporarily increased memory limit in function itself in my Controller file like 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 it will help someone in future!