3 years ago

Intervention/image memory_limit

Posted 3 years ago by freel

Hello team, I need your help. 4 hours tying to understand one thing. I am using Intervention/image memory_limit I have 128M

Problem is that when I am trying to open file. I am getting error 500.

$file_name = $request->file('myImage');
Image::make($file_name)->resize(300, 200)->save('foo.jpg');

As I understand We a running out of memory. PHP error log: [07-Apr-2016 22:41:10 UTC] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 21248 bytes) in /Users/Freel/Desktop/Web/ on line 114

Question: I found somewhere in google that memory_limit can be max 128M, so how to solve this issue? how to make this library work?

Image files I am trying to convert is 5mb. Thanks

Please sign in or create an account to participate in this conversation.