I create Laravel project on ubuntu 18.4.
I upload my project in /var/www/html/ and i upload images in home/sun/download/
after run this code:
$imageName = "thumb_{$size}.{$extension}";
$routePath = $url . '/products/' . $product->id . '/';
Image::make($file->path())->resize($size, null, function ($constraint) {
$constraint->aspectRatio();
})->save($routePath, $imageName);
Show this error:
"Can't write image data to path (/home/sun/download/products/2/)"
How to issue this problem?
Permission issue, Have you tried using the Storage facade?
That's how i stored images in my situation