Apr 27, 2020
0
Level 2
Can't write image data to path (Image intervention)- Cpanel problem
I am using this code to upload an image to the server
$filename = "post.jpg";
$post_img = Image::make($image)->resize(960,428);
$post_thumb_img = Image::make($image)->resize(400,280);
$post_img->save("/storage/post/".$filename,70);
$post_thumb_img->save("/storage/post/thumb/".$filename,70);
Now, this code is working in my localhost, but when I uploaded to the cpanel, it is showing me the error. The whole other website is working but image upload. How to fix that?
Please or to participate in this conversation.