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 Structure the Image Gallery

Getting images on the website

I upload the photo and follow the tutorial but when I preview it it just shows an image logo

ALFRED MOHENU
ALFRED MOHENU
1,499 Points

Can you paste your code here so that we can see what the problem is?

Ive treid resizing the picture aswell

Can you fix it?

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Jack Benning | Creator</title> </head> <body> <header> <a href="index.html"> <h1>Jack Benning</h1> <h2>Creator</h2> </a> <nav> <ul> <li><a href="index.html">Gallery</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <img src="Img/picture 7 retry.png" alt=""> </li> </ul> </section> <footer> <p>Instagram: Jack_benn</p> </footer> </body> </html>

5 Answers

how do I do that

Marcin Lubke
Marcin Lubke
13,253 Points

Make sure that your path and file name are exactly the same, including upper and lowercase.

For example, if your code is:

<img src="Img/picture.jpg">

It won't work if your folder name is "img", or "IMG", also when your picture name is "Picture.jpg".

You can also try a filename without any spaces, they may be changing to some other characters after uploading.

Fixed it, picture needed a caital

Bionta Garvin
Bionta Garvin
2,310 Points

I know this is a old post, but I had the same issue. Try clicking on your image in Workspaces and compare the name of the file and destination with what you typed. I don't know why but my file name was img// rather then img/ and i was struggling to make this work. Hope I'm not too late with this advice. and I hope it works.

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Jack Benning | Creator</title> </head> <body> <header> <a href="index.html"> <h1>Jack Benning</h1> <h2>Creator</h2> </a> <nav> <ul> <li><a href="index.html">Gallery</a></li> <li><a href="about.html">About</a></li> <li><a href="contact.html">Contact</a></li> </ul> </nav> </header> <section> <ul> <li> <img src="Img/picture 7 retry.png" alt=""> </li> </ul> </section> <footer> <p>Instagram: Jack_benn</p> </footer> </body> </html>

ALFRED MOHENU
ALFRED MOHENU
1,499 Points

Can't seem to find anything wrong with your code. Anyway, check whether the source to your image is correct. That may be the issue.