See my answer here
https://laracasts.com/discuss/channels/laravel/how-to-storage-link-laravel-project-in-live-server
And please study the documentation Taylor explains all of this.
Edit: Not sure what you are trying to do, but another way to display images, I don't use it any longer is:
<?php
$basedir = 'your base directory to images';
// but replac with your base dir
$imagedir = $_GET['dir'];
$image = $_GET['img'];
$file = $basedir.'/'.$imagedir.'/'.$image;
$fallback = $basedir.'/fallback.gif';
$size = filesize($file); // File size
$length = $size;
//DETERMINE TYPE
$ext = array_pop(explode ('.', $file));
$allowed['gif'] = 'image/gif';
$allowed['png'] = 'image/png';
$allowed['jpg'] = 'image/jpeg';
$allowed['jpeg'] = 'image/jpeg';
if(file_exists($file) && $ext != '' && isset($allowed[strToLower($ext)])) {
$type = $allowed[strToLower($ext)];
} else {
$file = $fallback;
$type = 'image/gif';
}
header("Accept-Ranges: bytes");
header("Cache-Control: public");
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: binary");
header("Content-Length: " . $length);
//header('Content-Disposition: inline; filename="' . $image . '"');
header("Content-Disposition: inline; filename=\"".$image."\";");
header("Last-Modified: " . date('r', filemtime($file)));
ob_clean();
readfile($file);
exit(0);
?>
files called with the img src tag
Your title:
How to get and display images
But then you say:
Storage::download()