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 How to Make a Website Creating HTML Content Add Image Gallery Content

my images are not showing in the browser.

The requested URL /img/number-01.jpg was not found on this server.

Estelito Calayag Jr.
Estelito Calayag Jr.
5,818 Points

maybe the forward slash before image makes the error ,maybe you should write it this way "img/number-01.jpg"

2 Answers

This helped me understanding folder pathing for images, css files, scripts and how to call them using html

W3Schools - HTML file paths

Path    Description
<img src="picture.jpg"> picture.jpg is located in the same folder as the current page
<img src="images/picture.jpg">  picture.jpg is located in the images folder located in the current folder
<img src="/images/picture.jpg"> picture.jpg is located in the images folder located at the root of the current web
<img src="../picture.jpg">  picture.jpg is located in the folder one level up from the current folder

Also don't forget you can use the Dev Console in your browser to manipulate what you are seeing on screen as well. This helps with debugging your site for errors that you come across. In Chrome its F12.

Rouillie Wilkerson
Rouillie Wilkerson
10,407 Points

I had the same problem. Then I realized, that I had to link the images "numbers-01.jpg" to the image file.

in other words: "img/" should proceed the file name "numbers-01.jpg" hence: "img/numbers-01.jpg" finally: <img src="img/numbers-01.jpg" alt="">

Also, be sure you've extracted your zip file before dragging and dropping from your file folder to the workspace folder.