I'm new to Laravel, but why the hell is this not working?
<img src='../img/netflix_logo.png' />
I've tried using php artisan storage:link
and it said The [C:\xampp\htdocs\laravel-crud\public\storage] link has been connected to [C:\xampp\htdocs\laravel-crud\storage\app/public]. The links have been created.
but the image is still not displaying in my .blade page..
CodePudding user response:
If you image is in storage/img then
<img src="{{ url('storage/img/netflix_logo.png') }}" alt="" title="" />
If you image is in public/img folder then
<img src="{{ URL::to('/') }}/img/netflix_logo.png" alt="" title="" />
CodePudding user response:
You probably need to use the "asset" helper from laravel/blade:
asset('/path/of/your/image')
it's the common way to call a static file from public folder ( including storage if you already linked it )