Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML Introduction to HTML and CSS (2016) Adding a New Web Page Linking It All Up

Magnus v. Zastrow
Magnus v. Zastrow
1,017 Points

How do I get pictures from my desktop/laptop in to my html?

I do know how to embed a picture into the html doc., but not how to embed a picture from my own laptop... How can I get picutres into my workspace?

2 Answers

Hey Magnus v. Zastrow,

If you're looking to embed an image locally on your machine, you'll need to provide the path to where your image is located:

<img src="\Users\Magnus\Desktop\MyImage.jpg">

or you can provide a relative path (relative to where you html file is located). So if your image is stored in the exact same folder/location as your index.html file, you can just write:

<img src="MyImage.jpg">

or if you had an "images" folder where your index.html file is, you could use:

<img src="images\MyImage.jpg">

Hope thats what you were looking for!

-Brandon

Max Senden
Max Senden
23,177 Points

Hi Magnus,

You can simply drag & drop your images in workspace. Do mind that the filetype is something that your browser can read (e.g. JPEG, PNG, GIF, SVG, WEBP...).

Cheers, Max