Image class intervention not readable! can anyone help me that why image not readable error show on deployment when i upload new photos to laravel project, which is totally fine in development environment but in production has this error enter image description here
AND this my intervention code in controller
if($request->hasFile('file')){
$nameWithExtension = $request->file('file')->getClientOriginalName();
$extension = $request->file('file')->getClientOriginalExtension();
$fileName = pathinfo($nameWithExtension, PATHINFO_FILENAME);
$newFileName = $fileName.'_'.time().'.'.$extension;
$upperExt = strtoupper($extension);
if($upperExt == 'JPEG' OR $upperExt == 'PNG' OR $upperExt == 'JPG' OR $upperExt == 'GIF'){
$request->file('file')->storeAs('public/doctor/',$newFileName);
$request->file('file')->storeAs('public/doctor_small/',$newFileName);
$request->file('file')->storeAs('public/doctor_small2/',$newFileName);
//Resize image here
$thumbnailpath = public_path('storage/doctor_small/'.$newFileName);
$img = Image::make($thumbnailpath)->resize(520, 668, function($constraint) {
$constraint->aspectRatio();
});
$img->save($thumbnailpath);
$thumbnailpath2 = public_path('storage/doctor_small2/'.$newFileName);
$img2 = Image::make($thumbnailpath2)->resize(100, 100)->save($thumbnailpath2);
}
}