Reputation: 139
Things I tried
1.simple path without URL::to
2.url() method
3.absolute path
4.asset(simple relative path)
in my .env file changed APP_URL from http://localhost to http://localhost:8000 since it runs on 8000 port
I am adding some pictures.
One thing which is important to mention here when i use Simple relative path it shows picture on hovering the mouse in IDE and on browser too but browser does not render it on webpage.
Please see pictures
src="{{URL::to('public/imgs/2.png')}}"
Upvotes: 0
Views: 122
Reputation: 3027
You have to put all your image resource files in public folder then access those resources through the following way:
src="{{ URL::asset('imgs/2.png') }}"
Upvotes: 0