I used ImageOptimizer package for reducing image size. source: http://image.intervention.io/getting_started/installation
in controller
if (Input::hasFile('title_image')) {
$Product = Input::file('title_image');
$filename = time() . '.' . $Product->getClientOriginalExtension();
Image::make($Product)->resize(300, 300)->save( public_path('/uploads/avatars/' . $filename) )->move(public_path() . '/../../products', md5($Product->getClientOriginalName()) . ".png");
$product->title_img = "products/" . md5($Product->getClientOriginalName()) . ".png";
}
how can I fix this error image not readable
???
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/397eHtL
via IFTTT
Aucun commentaire:
Enregistrer un commentaire