image or document not showing from storage folder I am trying to show an image from the storage folder it works fine on my local machine but when I uploaded it on the live server image did not show there.
I also created a storage link on the live server don't understand whats the problem.
<img src="{{ asset('storage/'.$userdata->company_logo) }}" class="avatar img-circle img-thumbnail w-50" alt="avatar">
any help will be appreciated thanks in advance.
If you run ls -ltr in the public directory on your server
Does it show something like this?
/<your project>/storage/app/public
@Tray2 yes it's showing.
for me path is //storage/app/public/company-images/
here is all images
Do you have public in the url on production?
@Sinnbeck yes in public folder the structure is public/storage/company-images
@armancs I mean is it in the url? Can you show share the page url?
@Sinnbeck
http://domain.com/storage/company-images/61c545ff00de0-logo.png
when i do like this in console then image showing
http://domain.com/storage/app/public/company-images/61c545ff00de0-logo.png
@armancs If you do this?
<img src="{{ asset('company-images/('.$userdata->company_logo) }}" class="avatar img-circle img-thumbnail w-50" alt="avatar">
@armancs so if you type in the url it works? What is the url that works and the one that does not?
@Tray2 no it won't work because I stored it in a database with that folder name.
@sinnbeck sorry for the misunderstanding.
and it's now working. problem solved i deleted the public folder storage link and created the storage link again then its works perfectly now.
thanks all for your help.
@armancs no worries. Glad you got it working :)
Please sign in or create an account to participate in this conversation.