1

I'm trying to display images from the storage/app/public folder and work on localhost and internal network, but not working when using the outside assess the page.

<a href="{{URL::asset('/storage/acknowledgement/'.$DNStatus->filename)}}" target="_blank" >
   <img  class="img-responsive pad" src="{{URL::asset('/storage/acknowledgement/'.$DNStatus->filename)}}">
</a>
Deepika
  • 48
  • 5
thomaslam
  • 21
  • 2

3 Answers3

0

If you're moving your code between localhost and your server via git, /public/storage is listed in the Laravel .gitignore by default

You'll need to copy the files to your server manually.

I wouldn't suggest storing your assets in /public/storage anyway, they should be in /public/assets or similar.

Joundill
  • 6,828
  • 12
  • 36
  • 50
0

You may use the storage:link Artisan command:

php artisan storage:link
Tai Ho
  • 546
  • 4
  • 9
0

You have to use like this

<img  class="img-responsive pad" src="{{url('')}}/path_to_your_image_folder/{{$DNStatus->filename}}">
A.A Noman
  • 5,244
  • 9
  • 24
  • 46