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?