image
image copied to clipboard
Cannot process large image, server return 500 error
Inpect the error return empty page, here is my code:
$img = Image::make(public_path($name))
->resize(320, 240)
->save('/assets/', $file->getClientOriginalName());
I'm also getting same error. The strange thing is that it's working for 10mb sized image but giving error on 5mb sized image.
memory_limit=2048M
$img = Image::make($originalFilePath);
$img->resize(intval($width), intval($height), null,
function($constraint) {
$constraint->aspectRatio();
});
$destinationPath = public_path('app/photos/thumbnails');
$photoName = explode('photos/', $filename);
$img->save($destinationPath.'/'.$photoName[1]);
Error occurring on Image::make;
Following file is the one which is not uploading.
@blu94 have you figured out this issue?
@umairm638 i include this code, ini_set('memory_limit', "2000M");
, enhancing the memory limit using php ways. It work in localhost, but i don't think this code will work on godaddy share hosting. normally share hosting RAM is 512M, i tested with set the memory limit to 512M, it is not working, it only work when 1000M or higher.
This is real problem. I use another image library with the same Image, and it works fine.
This is real problem. I use another image library with the same Image, and it works fine.
which library?
This is real problem. I use another image library with the same Image, and it works fine.
what libraries are you using?
Sorry too long to recall. If not mistaken, gumlet php image resizer.
Increasing memory limit and switching from imagick driver to gd solved it for me.
Increasing memory limit and switching from imagick driver to gd solved it for me.
Sorry too long to recall. Yes its the problem you can increae memory limit and timeout time and it will be fine
Hi, is this error coming up on live server or localhost? You need to increase the limits set in the php.ini file, this worked for me.
php.ini edits needed for server max_execution_time = 360 max_input_time = 360 memory_limit = 2048M extension=php_imagick
You can go as much higher but this works for some intense image manipulation that takes 3 minutes or more, also it can be server limits so in my case I had to increase the amount of RAM used on Digital Ocean.