I can show resized image with this code inside route,
Route::get('/create', function(){
$img = Image::make('assets/tes.jpg')->resize(200, 200);
return $img->response('jpg');
}
But how I can return resized image from Controler to View ?
Here is my Controller
publc function show($id){
$image = /*What code here ? resize assets/tes.jpg to 200x200*/
return view('some', compact('image'));
}
Here is my View some.blade.php
<img src="$image">
or should I resize on upload and save it, instead of resize on the fly ?
Thanks, any help appreciated.