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

cannot post images in my html! little question mark box appears

I cannot post images correctly. I have my images in a folder called img just like its being taught on treehouse. does anybody know how to get the image to post instead of the little question mark box?

12 Answers

Ali Amirazizi
Ali Amirazizi
16,087 Points

My guess is that your using the wrong extension. Make sure your citing your folder correctly use the correct extension of your image file. For example if you image is called cupcake.jpg, and it's in your "img" folder. You would add the picture like this: ''' <img src=img/cupcake.jpg> '''

Caroline Hagan
Caroline Hagan
12,612 Points

Did you get this sorted Justin?

If not if you can pop your code into a Codepen then we can see what the issue is :-)

Justin--am curious if you solved the problem, as I experienced the same thing. Thanks.

James Barnett
James Barnett
39,199 Points

The 2 most common mistakes when images are not showing up are a typo with the file names or using the wrong file path.

So triple check that you are using the exact name of the image files in your HTML, if that doesn't resolve the issue, check the file paths.

Here's a quick primer on file paths that should get you going.

Let us know how you are getting along with this here in this thread.

Thanks James. Will have to wait until tomorrow to try out your solutions--am hopeful they will work. Be well.

thanks i solved the problem with the picture. i right clicked the picture and it will give you all the info on where it is and what extension to use.

Hi I'm having the same problem except mines just not coming up with any image at all not even a little box with a blue cross! i think I'm doing it right, I have checked the file path and am using the correct file name. Help!

James Barnett
James Barnett
39,199 Points

Terry - Sounds like you've got an issue with your <img> tag in your markup.

Caroline Hagan
Caroline Hagan
12,612 Points

@Terry - please can you post your code somewhere, like Codepen or jsFiddle so we can see what could be the issue.

Hi @caroline. Apologise for the late reply! Computers been down for a while. I have just entered it into Codepen, however I'm afraid to say I dont really know what I'm doing with it! Do I save it and post it on here for you to see?

Regards

http://cdpn.io/BImya think this is the link! lol

Hi Terry - Caroline has paused her membership and cant respond to your comment. She invited to join us over here https://www.facebook.com/groups/treehousefans/