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

Issue uploading images

Hello I am trying to practise on some of my personal work and I am having some troubles uploading an images so it displays on google chrome. I have tried many different images, in jpeg form directly on my computer however the images is not showing up. Instead I am getting a small box with a standard logo. is as follows, could let me know if there is an obvious error here?

<img src="img/rh.jpg" alt="photo of rh">

<img src="img/rh.jpg" alt="photo of rh">

James Barnett
James Barnett
39,199 Points

The forum uses markdown to correctly format code, check out this thread on how to type code in the forum for some examples.

4 Answers

James Barnett
James Barnett
39,199 Points

I can't see any code, however I'm going to take a guess here ...

To me it sounds like you've got a file path issue with your images.

The way it works is that you have to put your images in the correct folder relative, to your HTML file.

Here's an example:

file directory structure example

Does that help?

If not, you can read up about absolute vs relative paths

Not seeing your code, but you probably want to check your src to make sure it is pointing to the image in its current directory.

I have noticed that when doing some of the exercises, my google chrome seems to be having a few glitches here and there, even though the code is right. Even the finished files I downloaded in the .zip for the lesson had a few things like images or link colors not displaying correctly. I am using a windows computer, so I believe that the issues you are having are probably problems in Google Chrome or Windows OS, assuming your code is right.

I have checked a number of times, i have also tried different browsers. so my image is saved in a file called HTML, where my sublime code is also saved. The image is called denim.jpg. The code I am writing in is as follows. <img src="HTML/denim.jpg" alt="denim image">

I have copied exactly what the video has outlined yet the images will not show.

I don't see any code...