Laravel Blade html image
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.
Change /img/stuvi-logo.png
to img/stuvi-logo.png
{{ HTML::image('img/stuvi-logo.png', 'alt text', array('class' => 'css-class')) }}
Which produces the following HTML.
<img src="http://your.url/img/stuvi-logo.png" class="css-class" alt="alt text">
Update After Laravel 5 this package has been deprecated and maintained as a separate external package. in order to work need to add this composer require laravelcollective/html
. more details https://laravelcollective.com/
as of now, you can use
<img src="{{ asset('images/foo.png') }}" alt="tag">