Save the images in your storage folder which isn't publicly accessible. Then create a route to generate the image based on the parameter, which could be the image name or path. Wrap this route with the auth
middleware. Display the image content with appropriate headers in the controller method for the route based on its parameters.
Edit : Check this out to give you an idea.
Sample route
Route::get('securedimage/{name}', 'SecuredImageController@show');
Sample controller method
public function show($name)
{
// check if the image with name exists in the folder that you store them
// If the image doesn't exist then display dummy image or return nothing
$imagePath = storage_path('/upload/' . $name);
return Image::make($imagePath)->response();
}
Then you can access images like so
<img src="http://example.com/securedimage/ball.jpg">
<img src="http://example.com/securedimage/topsecret.jpg">