Laravel Blade html image

patels326 picture patels326 · Apr 24, 2015 · Viewed 132k times · Source

My image file path is public/img/logo.png and
my app.blade.php file path is resources/views/app.blade.php

Inside of my app.blade.php file I use {{HTML::image('/img/stuvi-logo.png')}}
to display an image.
I don't understand why this won't find the image.
What is the root folder of the image() method?

Answer

Erfan Ahmed picture Erfan Ahmed · Mar 25, 2016

If you use bootstrap, you might use this -

 <img src="{{URL::asset('/image/propic.png')}}" alt="profile Pic" height="200" width="200">

note: inside public folder create a new folder named image then put your images there. Using URL::asset() you can directly access to the public folder.