Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Introduction to HTML and CSS 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!


Max Senden
Max Senden
23,141 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