I am trying to resize images in Laravel 4.2 using intervention, but i want to move images to 2 different folders at a time.
If i run the below code
if(Input::hasFile('product_images')) {
$images = Input::file('product_images');
foreach($images as $image) {
if($image->isValid()) {
$file_name = microtime();
$file_name = str_replace(' ', '_', $file_name);
$file_name = str_replace('.', '_', $file_name);
$file_name = $file_name . '.' . $image->getClientOriginalExtension();
$file_name = $image->getClientOriginalExtension();
$image->move(public_path() . '/uploads/', $file_name);
$file = Image::make(sprintf('uploads/%s', $file_name))->resize(800, 600)->save();
It(above code) runs proper for uploads folder but, if i create another folder called thumbnail inside uploads & add below line i'll get error as....,
("Intervention\Image\Exception\NotReadableException","message":"Image source not readable")........
$file = Image::make(sprintf('uploads/thumbnail/%s', $file_name))->resize(75,75)->save();
Thanks in advance