Why Doesn't My Image Load?

- 1 answer

I'm building a site using laravel and I want to add a picture in one of the pages. I created an images folder that is located in \app directory and put the picture in the images folder. So in my blade.php file that loads the site I have this code to load the image

{!! Html::image( asset('app/images/default.png'), 'Profile picture') !!}

However when I load the page I see a broken picture icon and when I inspect the element I get the message

localhost/:24 GET http://localhost:8888/app/images/default.png 404 (Not Found)

I've tried any combination that I could think of in order to make the link work but I always get a 404 error when I load the page.

Any ideas?



You should move your images folder from app to public. Do the same with all css and javascript files.