Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding an image from a url - html

Tags:

html

image

I am having trouble displaying an image from the internet on my html page.

The line is:

<img src="http://www.somepic..." alt="pic" />

What is wrong with it? Does that only work with images that are on my disk?

Thank you

like image 755
user690936 Avatar asked Feb 03 '12 13:02

user690936


1 Answers

Based on the URL you've presented in the comments above, my guess is that you're not actually linking to an image, you're liking to a web page but mistaking it for an image.

For instance, the url you provided:

http://www.google.co.il/imgres?q=picture&hl=iw&sa=X&rlz=1C1SKPL_enIL452IL452&tbm=isch&prmd=imvnsl&tbnid=BAlLxbccyZkwSM:&imgrefurl=http://animal.discovery.com/mammals/cheetah/&docid=qDOKJbIkYvvzyM&imgurl=http://animal.discovery.com/mammals/cheetah/pictures/cheetah-picture.jpg&w=625&h=450&ei=Y-grT8_ZNYnntQb4kID0DA&zoom=1&iact=hc&vpx=693&vpy=191&dur=850&hovh=190&hovw=265&tx=155&ty=84&sig=110318714666115395229&page=1&tbnh=141&tbnw=183&start=0&ndsp=19&ved=1t:429,r:1,s:0&biw=1280&bih=656

Is the URL of a webpage showing the image, not the image itself.

Make sure you're linking to the actual image itself:

<img src="http://animal.discovery.com/mammals/cheetah/pictures/cheetah-picture.jpg" 
alt="Cheetah!" />
like image 107
Jamie Dixon Avatar answered Sep 20 '22 20:09

Jamie Dixon