Dave Taylor answers free tech support questions about a wide variety of business and technical topics, including blogging, iphone help, ipod help, AdSense, MySpace, Sony PSP help, Mp3 players, Windows XP, Windows Vista, Linux, SEO, Mac OS X, Facebook, Twitter and LinkedIn.

How do I add a picture to my Web page?

I've been reading your Creating Cool Web Sites book, and what I'd like you ask you is how do I put a picture on website? Even though you have mentioned it I am not sure what to write in the <img src='__" />. I am not sure where you get that part if you want to download a picture from the Internet. It would be a great help.


Dave's Answer:

If you're trying to add a picture on your Web page that's already somewhere else on the Internet, there are two different ways you can accomplish this task.

The first one, the easier one, is to simply right click (or, if you're on a Mac, Control-click) on the image when you view that page that hosts it. Your Web browser will pop up a menu of options, one of which will be something like "Copy Image Location" or "Copy Image" or similar. Do that.

Now the fully qualified URL of the image is in your copy and paste buffer. Go to the source of the Web page where you want to add the image then use the menu option Edit --> Paste to copy the URL of the image into your own Web page. Save the page. Done!

Here's an example of this. Let's say you were visiting the Department of Homeland Security Web site and really liked its logo. You right click on the image on the page then choose "Copy Image".

Now your copy and paste buffer will have this:

http://www.dhs.gov/dhs/images/dhs-header-title.jpg

To include that graphic on your own page, you'll want to type in the following:

<img src="" />

then place your cursor between the two quotes and choose Edit --> Paste. Now it'll look like this:

<img src="http://www.dhs.gov/dhs/images/dhs-header-title.jpg" />

Add that to your page, load your page in a Web browser, and you'll see this:

U.S. Department of Homeland Security organizational logo

Make sense?

The other way you can do this is to download the image to your own computer, then upload it to your Web server and use a local reference. It's more complicated, but that way the Government site doesn't have to serve up graphics for your personal page.

To do this, right click on the image as before, but this time choose "Save Image As..." and save it to your Desktop, naming it suitably for your uses. Now use whatever tool you use to upload your HTML files to your public server (probably an FTP tool of some sort) and upload the graphic file itself.

Let's say that it's called dhs-header-title.jpg for purposes of explanation. Since you've uploaded it into the same directory that will contain your HTML, your HTML references to the image are simply:

<img src="dhs-header-title.jpg" />

Before we leave this answer, however, a brief note that regardless of what type of site you're building, commercial or personal, you should respect the copyright and intellectual property ownership of images on other sites. Just because the Motorola logo looks cool doesn't mean you have a legal right to include it on your site, copied or otherwise.

Some sites don't have this restriction, notably governmental sites, but the vast majority of Web sites out there should be assumed to have protected or legally off-limits images. If there's any doubt, email the webmaster and ask for permission.

Hope this sheds some light on your puzzlement!



Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.


Subscribe!

Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader.

Comments

REGARDING PUTTING IMAGES ON YOUR WEBSITE. I HAVE JUST STARTED LEARNING WEB DESIGN SO I HAVEN'T PUT ANYTHING ON THE WEB JUST YET, STILL WRITING PROGRAM. I AM USING PERSONAL PHOTO'S IN MY PICTURES FOLDER. WHEN I GO ONLINE AND OPEN MY HTML IT SHOWS EVERYTHING BUT THE PICTURE IS A RED X IS THIS OK OR IS MY PICTURE NOT GOING TO SHOW ON THE WEB SITE. IF IT'S OK HOW CAN I TELL IF THE POSITIONING IS OK, IF NOT DO YOU KNOW WHY I CAN'T GET IT TO FIND THE PHOTO'S? I PUT IN THE FULL ADDRESS OF THE FOLDERS. THANK YOU.

Posted by: SANDY at February 22, 2007 8:46 AM

hey Mr. Dave,


what can I do to get the pictures of my website ENLARGED on new window with clear resolution by simply clicking on it ??

thanks
tayeb

Posted by: tayeb at March 11, 2007 4:05 AM

How do I get a picture to show up in the tile bar of the web browser when my web site is up? I think this is a really classy touch and I would like to add it to my site - which I am currently building.

Posted by: DaveP at July 24, 2007 1:42 PM

I got my cousin to take some pictures of me on her phone and email them to me so I could add them to My Space and I can't get them on there for nothing. I tried saving them to a folder called "Pictures to add to sites" but now I can't find that anywhere. Man this is driving me crazy. I'm about ready to throw this damn computer out of the window. Please help me man. I have several different sites that I really need to place these pictures so I can be seen but no matter what I do I'm still left looking at a blank space where my photo should be. What's worse is so are the ladies I want to see them. Please man. HELP!!!

Posted by: fuse1318933 at October 1, 2007 1:10 PM

Hey there I just need some information , about enlarging phone photos downloaded on my computer through a D600 Samsung mobile phone , I was on holidays overseas and had to purchase a PREPAID CARD,at the mobile shop my phone was not switched off,to replace the original sim card with one off theres , so all the phone picture settings were lost I did not know it till i got back home. T he pic size is 240 x180 , Type JPEG, Size 3.78 kb some are at a higher up to 7 kb, is there any way to enlarge them without deforming the pic , I do hve quit a lot of pics. Please advice me best regards Bassile Anastasopoulos

Posted by: Bassile at February 19, 2008 10:34 PM

Hello

I am trying to post a picture on a webpage stored in a temp folder in the c drive.

Is it possible to give me an example in code how to do this

Thank you

Posted by: costa at August 8, 2008 8:32 PM

I have a lot to say, but ...
Starbucks coffee cup I have a lot to say, and questions of my own for that matter, but most of all I'd like to say thank you for all your efforts on this Web site by buying you a chai!

I do have a comment, now that you mention it!









Remember personal info?


Please note that I will never send you any unsolicited commercial email. Ever.

While I'm at it, please note that by submitting a question or comment you're agreeing to my terms of service, which are: you relinquish any subsequent rights of ownership to your material by submitting it on this site.









Uniblue: Free Virus Scan


Join Me At:
Aloha Social Media Summit, Oct 2008


Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.


Help!





Subscribe to
Ask Dave Taylor!

Add to Google Reader
Add to My Yahoo!
Subscribe in NewsGator Online

RDF   XML

Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.


Recent Entries
Join the List!
Join my author info mailing list, where you'll learn about my upcoming books, speaking gigs, and more!


Book Links
© 2002 - 2008 by Dave Taylor. All Rights Reserved.

Note: This web site is for the purpose of disseminating information for educational purposes, free of charge, for the benefit of all visitors. We take great care to provide quality information. However, we do not guarantee, and accept no legal liability whatsoever arising from or connected to, the accuracy, reliability, currency or completeness of any material contained on this web site or on any linked site.

[whiteboard marker tray]