Search code examples
phplaravelpngjpeg

Laravel and images display


I'm using laravel 5.2, in this moment I'm testing my views with the builtin php server. To display images in the views, I used this code

<img src="{{asset('images/logo.png')}}" alt="logo">

when I load the page with a browse I don't see the images, if I try inspect the code I see

<img src="http://localhost:8010/images/logo.png" alt="logo">

Then, if I try to follow the link of the image, I don't see the image but it's code:

http://p4c.it/test.jpg

it's clear that I'm doing something wrong, is this issue related with the definition of mime types? For what I see the {{asset('my_file_here')}} works fine with css files and jvascript.


Solution

  • at first create virtual host and check your image folder permission .