So I have this code for uploading images in my laravel app:
$imageName = rand(111, 99999) . '.' . $extension;
$imagePath = 'images/category_images/' . $imageName;
Image::make($image_tmp)->resize(533, 533)->save($imagePath);
It works perfectly on localhost, but after deploying the code online, I can't read or write images from the admin panel of my app. It works on the user part though (The user part can read images).
I've set the permissions on the folders to 775 and on files to 644. So I really have no idea why this isn't working. Please help
This is the error I get when I try to upload:
Intervention \ Image \ Exception \ NotWritableException
Can't write image data to path (images/category_images/74327.png)