Radu Vlad
Radu Vlad

Reputation: 1514

Image not loading - "Failed to load the given URL"

I have an issue with firefox, it doesn't load an image.All the other,Chrome, Opera and IE can load this but firefox fails, it does not display any picture and if i go check with firebug it displays the following error on the image link: "Failed to load the given URL". I did clear my cache, also, if i open the image link in another tab it works.

THe code:

<ul class="nav navbar-nav navbar-right">
<li>
   <a style='padding:4px' href="<?php echo $login_url?>">
      <img src="<?php echo base_url(); ?>img/facebook_log22.png" class='facebookLogin' />
   </a>  
</li>
</ul>

Also in style:

.facebookLogin
{
height:40px;
} 

I'm using codeigniter(if u wonder about base_url() function) and bootstrap(but i don't think that matters so much.

Edit: I also see that it adds another class to the code... Also,the error: enter image description here

Upvotes: 7

Views: 22047

Answers (4)

Ted
Ted

Reputation: 1

I once had a similar problem and after a frustrating time of checking and rechecking my path, I realized the problem was the images were uploaded as ".JPG" but my css had ".jpg" It was a capitalization issue.

Upvotes: 0

Jithesh Chandra
Jithesh Chandra

Reputation: 880

I also ha a similar error , i opened it again with a different browser it was working . right click >View Image > you must be able to see your image if the link is correct .

Upvotes: 0

Radu Vlad
Radu Vlad

Reputation: 1514

Ok,i finally know what the problem was,and it is called adblock plus.Damnit,totally forgot i have that installed on my firefox. Thanks a lot guys.

Upvotes: 37

Vladimir Kocjancic
Vladimir Kocjancic

Reputation: 1842

If you are referencing image from domain, it will not work, unless you:

  • put http:// in front of your link: src="http://<?php echo base_url(); ?>/img/facebook_log22.png", or
  • create a relative link: src="/img/facebook_log22.png" .

Upvotes: 1

Related Questions