I am trying to display images from the storage/app/public folder. Whenever my controller retrieves the images form this folder with
$images = Storage::files('public');
The files retrieved from here are prefixed with public/, rather than storage/.
The problem this causes is that an image can be found localhost/storage/filename.jpg, but cannot be found with localhost/public/filename.jpg or localhost/storage/public/filename.jpg.
I can resolve this issue by manually cutting off the public prefix and replacing it with storage, but this isn't a particularly graceful way of doing things.
I have run the command php artisan storage:link and rerunning it results in a The "public/storage" directory already exists. message.
/public/in your URLs.publicshould be the server's DocumentRoot for your project.