image
image copied to clipboard
Intervention \ Image \ Exception \ NotReadableException Image source not readable
Hola amigos tengo el siguiente error al guardar una imagen en laravel con intervention image, alguna solucion? Hello friends I have the following error when saving an image in laravel with the image of the intervention, the solution of the solution?
public function storage (Request $request) { # carga de fotografias
$file = $request->file('lugarsiniestro'); $fileName = time() . '-' . $file->getClientOriginalName(); $file->move('uploads', $fileName);
$img = Image::make($file->getRealPath()) ->resize(300, 240) ->save('public/uploads/', $file->getClientOriginalName());
}
Oh, I have the same problem as you. That images url is very long and have other code, I don't know if this is the reason.
Hola amigos tengo el siguiente error al guardar una imagen en laravel con intervention image, alguna solucion? Hello friends I have the following error when saving an image in laravel with the image of the intervention, the solution of the solution?
public function storage (Request $request) {
carga de fotografias
$file = $request->file('lugarsiniestro'); $fileName = time() . '-' . $file->getClientOriginalName(); $file->move('uploads', $fileName);
$img = Image::make($file->getRealPath()) ->resize(300, 240) ->save('public/uploads/', $file->getClientOriginalName());
}
heeeee, I just found out the reason for this problem, I don't know if it is similar to your situation. When the images url have chinese string, that error will appear
Replace
$resize = Image::make('storage/app/public/'.$user->image)->resize(300,300);
with
$resize = Image::make(storage_path('app/public/'.$user->image))->resize(300,300);
Give storage full path will solve the problem.