Retrieve image from storage folder in laravel 5.5

1

I have a problem that I can not find a solution for, I saved the path of an image, which I store in the storage / employees folder, when I retrieve it in local it works correctly but when I upload it to a hosting I get the following error:

  

Sorry, the page you are looking for could not be found.

I have the filesystem file set up like this:

'empleados' =>[
        'driver' => 'local',
        'root' => storage_path('empleados'),
        'url' => env('APP_URL').'/storage/empleados/',
    ],

I try to recover in this way:

<img style="width: 50%; height: 50%" src="{{url('/')}}/{{$usuario->empleados->foto}}" width="100%"/>

Someone knows how to recover.

    
asked by Juan Antonio 04.09.2018 в 17:51
source

1 answer

1

To be able to access the images while on a server you have to create a symbolic link from your storage folder.

$ php artisan storage:link

Laravel 5.5 documentation

    
answered by 04.09.2018 в 18:34