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

Kudakwashe L Maluwa
Kudakwashe L Maluwa
9,271 Points

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,419 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.