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 Adding Pages to a Website Add a New Page

Problem with photo not showing on about page

I'm doing exactly what is shown in the video to add a photo to the about page. what that section of it looks like -

    <img src="img/laura.jpg" alt="Photograph of Laura Gray" class="profile-photo">```

I tried using the stock photo that was provided, just to make sure it wasn't a problem with the photo - still didn't work. Am I missing something? I've gone over and over the video and my work 10 times and am still coming up blank. I would really appreciate any help! Thanks!

2 Answers

Alessandra Vaughn
Alessandra Vaughn
13,915 Points

Hi Laura,

Your code snippet is correct. Does the image exist in the "img" folder? It might be in the same location as the about.html file, which would be an issue. Then you would have to change the src path or move the photo.

Yeah, it's in the img folder - I double checked that too. Thanks for the quick response though!

Alessandra Vaughn
Alessandra Vaughn
13,915 Points

Sometimes when I create an image in a JPG format using a certain program, the file gets created as "photo.JPG" instead of "photo.jpg" which can cause problems. Are you able to see what the extension is on the photo?

It's .jpg format. I tried using the photo that was provided with the track as well as another photo I had used elsewhere in my code (with success) and neither of those would show up either.

Oh wow... so it's a problem with css and the styling... I decided I would just continue with the next video and come back to this later. Turns out I had already watched the next video a bit and had started in on the styling, though when my photo didn't show up, apparently the idea of it being css related didn't even occur to me and I had forgotten that I had even written css related to the photo. Yikes, newbie mistake. I'm so sorry I sucked up your time and I really appreciate the help!

Majid Mokhtari
Majid Mokhtari
10,506 Points

Try this see if this works: src="../img/laura.jpg"

Didn't work. Thanks though!