Intervention not resizing large files

百般思念 提交于 2020-01-03 05:21:28

问题


I am using [Intervention][1] to resize Files. I figured out it is not resizing large files like this one

Code I am using is:

if (Input::hasFile('image'))
            {
                $file = Input::file('image');
                $r = $file->move('uploads', $file->getClientOriginalName());
                Image::make('/mountain.jpg')->resize(200,200)->save('uploads/k2.jpg');
                //print_r($image);
                exit;
            }

Code works fine for smaller files. The file size is 2.x MB and my PHP limit is 32MB.

Update: Laravel Log says:

' with message 'Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes`

回答1:


Through finding out your error log message; Allowed memory size of 33554432 bytes exhausted (tried to allocate 3008 bytes, your app is running out of memory.

Increase this by changing the value of memory_limit within your php.ini file.

Be sure to restart your webserver.



来源:https://stackoverflow.com/questions/28747580/intervention-not-resizing-large-files

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!