i'm working with Intervention Image and his extension for the cache Intervention Image Cache It work pretty well.
What i'm trying to be able is to cache the image on the browser with the headers and Intervention.
Wich is the best way to achieve that?
let's say I have a route, it hooked an a method to my controller that handle the response for show the image like so:
public function showImage($name_image)
{
// how can set the headers for get image cache on browser?
$img = Image::cache(function($image) use ($name_image) {
return $image->make('myFolderPathImage'."/".$name_image);
});
return Response::make($img, 200, array('Content-Type' => 'image/jpeg'));
}