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

Broken Image in Workspaces

I am having a trouble with broken images in my HTML. I am on a bootstrap build. My file tree and my html is within this URL. Please help http://www.screencast.com/users/mjjply12/folders/Default/media/9e94721c-ec35-428c-a053-14f181b6191e

3 Answers

Using parentheses in URIs can produce unexpected results. Best to not use them at all. Same with spaces in filenames.

Also, you really should use a more semantic name than just "image" anyway and you should include the alt attribute.

So, rename your image to something like "sunset.jpg" and then use the following HTML to link to it:

<img src="img/sunset.jpg" alt="Photo of sunset">

Hi Phil, thank you for your comment, it worked! The change in the actual name of the file instead of the standard "image" fixed the issue. I love this website!

Anas Mourad
Anas Mourad
14,922 Points

Hey Matthew, I see some extra spaces in image tag. Remove them and try again. You can call the image: "image.jpeg" instead so your code can be 'src="img/image.jpeg" '.

Hi Anas, I just tried using that format and that does not work either.

Hi Matthew, I suggest you try src="/img/image(1).jpeg"

Hi Gloria, thank you for responsing. I have already tried that way and it does not work either.

Oh okay, I didn't see it in the examples you gave.

It wasn't. I forgot to include that. It was my fault.