Ad

How To Display A Picture On Laravel?

- 1 answer

i'm trying to display picture on laravel.

I did that : <img src="public/medoc.jpg" alt="Toxic Project">.

To be sure at 100% it is not a link problem i writed public/medoc.jpg on terminal and it's launch the picture.

I try to diplay it on the welcome view.

I have alredy tried with : "{{ asset('public/medoc.jpg') }}"

What's wrong ? thanks

Ad

Answer

The asset() helper provided by Laravel is already referencing to the public folder. So all you need to do is :

<img src="{{asset('medoc.jpg')}}">

And Laravel will do the rest for you.

Ad
source: stackoverflow.com
Ad