I’m trying to display an image of a record in the table using storage, the code I made is not returning the image, and when I put its path in the browser it is possible to see the image.
- Column to show image at table
<td> <img src="{{ url(IlluminateSupportFacadesStorage::disk('local')->url($cli->image_client)) }}" class="w-16 h-auto"></td>
- Path from file
/opt/lampp/htdocs/client/storage/app/avatars/yTYkibyZFb9oYaF4uPfgHTg25Pa599PYiVI7btMC.jpg
filsystems.php
'links' => [
public_path('storage') => storage_path('app/public'),
public_path('avatars') => storage_path('app/avatars'),
],
dd($validations['image_client'])
"avatars/yTYkibyZFb9oYaF4uPfgHTg25Pa599PYiVI7btMC.jpg" // app/Http/Controllers/ClientController.php:49
2
Answers
To access the file in the
avatars
folder:Or, from the storage directory: