How to Find the Codes or URLs for Web Images

Get the facts in just a minute

Want to know how to find the code or URL for your images? Master this process in just one minute with this speedy tutorial. It's easier than it seems. When you're finished, add the image code to your Web pages.

Getting Started

To begin, go to the page with the image you want on your Web page. Keep in mind, however, that you should use an image that you own. That's because pointing to other people's images is considered bandwidth theft and can get you in trouble - even legally.

Copying another person's image to your website is a copyright violation.

Now that you understand that, identify which browser you'll use. In Internet Explorer, right click on the image and choose “Properties.” Copy the address of the image. In Firefox, right click on the image and choose “copy image location.”

Once you have your image URL, you can add it to the HTML document. The easiest way is to click on the “add image” icon in your Web editor. But if you don’t have one, here’s how to add it with HTML:


<img src="

Paste in the URL.


" alt="Your alternate text">

Upload your Web page and test it in a Web browser.

Your final image code will look something like this:

<img src="URL" alt="alternate text">

Useful Tips

Width and height attributes are not required on images, but they help them load faster. If you know the dimensions of your image, you should include them as height="" and width="" attributes.

For example:

<img src="image.gif" alt="image" height="300" width="200">
  • Good Alternate Text: Describe your image in the alt attribute. If the image has text in it, the alternate text should say the same as the image.
  • Image Dimensions: Image width and height are defined in pixels, but do not include the “px” in your width or height attributes. And always use the exact dimensions. Don’t use the width or height attributes to resize your images. This can result in huge images that take forever to download, and browsers don’t resize images very well.