0
votes

I can't get the images to display on my laravel website. I have the images in the public/img directory and have tried with

  src="{{ url('img/logo.png' }}"

and

   {{ HTML::image('img/logo.png') }}

I'm using Laravel 5.2. The url displays correctly in the web console as localhost:8000/img/logo.png but doesn't display the image

1
check by entering "localhost:8000/img/logo.png" in different tabjaysingkar
It downloads the image. But says "can't open the file" when I try to open itmattesj
ok, once try removing port number. I got into this issue once, but can't remember how I resolved it.jaysingkar

1 Answers

0
votes

I don't know whether it was your typo when writing this post or not, can you try to change your code to:

src="{{ url('img/logo.png') }}"
                          ^
                          you left out a close bracket

If there is any changes please leave it in comment, I will try to modify my answer.

Hope it helps =)