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

Image preview showing icon instead of picture.

When adding syntax:

<img src="img/LarryGonzales2.jpg" alt"">, and preview it on chrome, it won't show actual photo, but instead an image icon. I've made sure images is enabled in the browser settings, also double checked if folder is named correctly on both file, and syntax. I'm using atom as my text-editor.

2 Answers

Jay Norris
Jay Norris
14,824 Points

If that image specified is the full image, it should work. I notice you forgot your equals sign in alt""

Thanks, I did fix, and re-previewed page, and still shows icon

Kaitlyn Threndyle
Kaitlyn Threndyle
18,204 Points

Depending on how your directory is structured you have to add ../ before img/LarryGonzales2.jpg. So it would look like this : <img src="../img/LarryGonzales2.jpg" alt="" />

Try it and see?

followed syntax, and still same issue.

fixed syntax to:

<img src="img/LarryGonzales2.jpg" alt="">, didn't work with forward slash added to the end, or even adding the extra extension of folder(../img). The folder I added to atom is named img, and photo is named LarryGonzales2.jpg.