X-Mac's avatar
Level 1

Show image on blade

Hi there, I updated some images on storage/app/public. I created also symbolic link. on local - and everything works good. I COPIED all files on my remote server.

  1. In production when I upload the image the image is stored in storage/app/public but in httpdoc/storage there is no copy of the image.
  2. I try to show the image in blade like this

But I can't see any image. I don't understand how manage this links. The config file is like this: 'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
        'throw' => false,
    ],

    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
        'throw' => false,
    ],

thanks in advance for your help

0 likes
2 replies
MohamedTammam's avatar

Are you sure that you ran php artisan storage:link on the server?

Harsha63's avatar

Check your folder structure storage folder exist in the public folder. if not then run this command

php artisan storage:link

Write image path as per bellow

<img src="{{ url('/') . asset('storage/post/' . $post->image) }}">

Please or to participate in this conversation.