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 trialLaura Gray
469 PointsProblem 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
13,915 PointsHi 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.
Majid Mokhtari
10,506 PointsTry this see if this works: src="../img/laura.jpg"
Laura Gray
469 PointsDidn't work. Thanks though!
Laura Gray
469 PointsLaura Gray
469 PointsYeah, it's in the img folder - I double checked that too. Thanks for the quick response though!
Alessandra Vaughn
13,915 PointsAlessandra Vaughn
13,915 PointsSometimes 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?
Laura Gray
469 PointsLaura Gray
469 PointsIt'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.
Laura Gray
469 PointsLaura Gray
469 PointsOh 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!
Alessandra Vaughn
13,915 PointsAlessandra Vaughn
13,915 PointsGlad you got it figured out.