I want to resize my images with Intervention Image package, but When I tried it gives me that error.
Intervention \ Image \ Exception \ NotReadableException
Image source not readable
My codes;
if ($request->hasFile('featured_image')) {
$realname = pathinfo($request->file('featured_image')->getClientOriginalName(), PATHINFO_FILENAME);
$extension = $request->file('featured_image')->getClientOriginalExtension();
$new_name = $realname."-".time().".".$extension;
$request->file('featured_image')->storeAs('public/uploads',$new_name);
$path = Storage::url('uploads/'.$new_name);
$post->featured_image = $path;
Image::make($path)->resize(320, 240)->insert($path);
}
How can I fix this ?