Tomasz
Tomasz

Reputation: 1408

Displaying files from Storage in Laravel 5.3

How to display images uploaded to Storage on view using Blade.

I am trying: On view:

<img class="thumbnails" src="images/qqq3.png" alt="{{ $img->name }}">

In routing:

Route::get('images/{filename}', function($filename){
    dd($filename);   
});

but routing like this is not call

Upvotes: 0

Views: 673

Answers (2)

lewis4u
lewis4u

Reputation: 15027

Just make symlink from storage folder to public folder

run this command from your root project folder

php artisan storage:link

And you can access the files

Upvotes: 1

Alban Mulaki
Alban Mulaki

Reputation: 82

To make and image or file public you should upload them on public folder. If you want to put a image on your src="yourcontenthere base64" you should read image from storage and encode on base64 and put your content to your src=""

Upvotes: 0

Related Questions