it should rather be this. $image = Input::file('image'); $filename = time().'-'.$image->getClientOriginalName(); $path = public_path('/img/products/'.$filename); Image::make($image->getRealPath())->resize(468, 249)->save($path); $product->image = asset('img/products'.$filename);
Jan 7, 2016
1
Level 4
Intervention Image
am trying to upload an image using Intervention Image but i got this error.
Can't write image data to path (http://localhost/ecomm/public/img/products/2016-01-07-19:08:55-tablet-upload.jpg)
This is my controller; $image = Input::file('image'); $filename = date('Y-m-d-H:i:s')."-".$image->getClientOriginalName(); Image::make($image->getRealPath())->resize('468, 249')->save(asset('/img/products/'.$filename)); $product->image = asset('img/products'.$filename);
Level 4
Please or to participate in this conversation.