close

[Solved] Laravel – Image saved in storage folder not showing to user

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error Laravel – Image saved in storage folder not showing to user in php. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How Laravel – Image saved in storage folder not showing to user Error Occurs?

Today I get the following error Laravel – Image saved in storage folder not showing to user in php.

How To Solve Laravel – Image saved in storage folder not showing to user Error ?

  1. How To Solve Laravel – Image saved in storage folder not showing to user Error ?

    To Solve Laravel – Image saved in storage folder not showing to user Error

  2. Laravel – Image saved in storage folder not showing to user

Solution 1

you have add this line in your .env file

FILESYSTEM_DRIVER = public

after that you need to run this command in your terminal

php artisan storage:link

and if that’s is still not working then you need to call storage directory before your link

                <img src="{{ asset('storage/'.$post->image) }}" width="120px" hight="120px" alt="">

Solution 2

You can’t use the storage folder for this. You need to move the images to the public folder to access from http.

Try to create a folder call images in public folder and upload the image to that folder. Then you can access the images as follows.

<img src="{{ public_path('images/image-name.png')}}" alt="" />

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read

Leave a Comment