i used ImageOptimizer package for reducing image size.
source: http://image.intervention.io/getting_started/installation
in controller
use Image;
if (Input::hasFile('title_image')) {
/*$this->validate($request,[
'photo' =>'required|image|mimes:jpg,jpeg,png|max:2048'
]);*/
$Product = Input::file('title_image');
$Product->move(public_path() . '/../../products', md5($Product->getClientOriginalName()) . ".png");
$product->title_img = "products/" . md5($Product->getClientOriginalName()) . ".png";
}
now i want to convert image in this function when i upload. if I add this method $img = Image::make('foo.jpg')->resize(300, 200);
it says storage not found error. now what can I do. please give me some suggestion. thanks in advance
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire