Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Blade html image

Tags:

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?

like image 516
spatel95 Avatar asked Apr 24 '15 21:04

spatel95


People also ask

How do I display images in laravel blade?

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. Show activity on this post. Show activity on this post.

Where to put img in Laravel?

Just put your Images in Public Directory (public/... folder or direct images). Public directory is by default rendered by laravel application.


1 Answers

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.

like image 111
Erfan Ahmed Avatar answered Sep 20 '22 07:09

Erfan Ahmed