mardi 20 février 2018

Laravel - Intervention Image - Image source not readable

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 ?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire