Allowed memory size of 134217728 bytes exhausted (tried to allocate 81920001 bytes)

Viewed 1679

I know there are tons of questions regarding this problem. But I still couldn't understand the cause. The error shows when I add resize function.

Image::make($logo)->resize(200*200)->save(public_path('Uploads/logo/' . $fileName));

Otherwise it works fine. Why would a function tries to consume that amount of memory?

3 Answers

Increase the amount of variable memory_limit = 128M in php.ini to your applications demand. It might be 256M/512M/1048M.....

Related