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

General Discussion

Images Sublime Text

Hi! I downloaded the pictures for the cupcakes website, but for some reasons it won't work when I try to put them in sublime text (Sorry for my English, I'm French and I don't know anything about web vocabulary!). The images just don't show up on the website page. I already checked twice and I did everything well. How can I fix it?

15 Answers

Did you add the image type? (AKA .png, .gif, ect) Also, it could be that you aren't putting the name of the file before the name of the image.

Yes I added the type. I wrote them like that : <img src="img/logo.gif"> And it still doesn't work. Also, when I opened the folder with the pictures on the side, it said ".zip", is that normal ?

Hey, I finished the "Smells Like Bakin'" website not too long ago. Remember to close the "img" tag. Everything must be included, parenthesis and all.

Also if images are in a separate folder called: "img" , its important that you put "img/logo.gif". By using "/" the browser knows to search in a separate folder to find the image. Replace "logo.gif" with the file name of the image you want to use.

Hope this helps!

It's exactly what I did, that's why I don't understand! Thanks for your help

Hmmm.... do you have a program to unzip the files? Cause after you open the zip file you should create a new folder on your desktop or anywhere you want and drag the files from the zip file into the file you created on your desktop.

Hey Caroline

Can you please put the code that's not working in the forum post? Just click 'Edit' on the original post. That way we can see what's wrong with it.

Thanks, Ryan

All my image codes are not working. For example, I have this one : <img src="img/logo.gif" alt="Smells Like Bakin"> My images are in the folder called img but should I write web/img/logo.gif or just img?? Thank you

Where's the html file your editing located? Is it in the folder where the images are? Lets say you put them in a folder called: "project" and your html file is in there, if your images are in the file name "project" as well, you only have to put "logo.gif" within your img tags. But if the img files are in a separate folder INSIDE the folder named "project", then you have to put: "img/logo.gif" . That way it knows the images are in a separate folder WITHIN the folder your html file is. Lol hope thats not too confusing.

update: Just noticed Maya headbutted this issue beautifully.

Thank you! I actually understand better with your explanation, but thank you both! So now for some reasons, some of my images appear while other don't. I'm working on it! Thank you very much

No problem, you actually get better by troubleshooting so keep it up!

That's true! Last question: All of the pictures work except for the first two, why is that? They are written exactly the same way and there is no mistake in the name of the file...

What are the names of the two images that are not displaying?

It's ok! I have my images. Thanks a lot :)

Sweet! Si se puede! Celebrate your victory over HTML!

I actually had your same problem Caroline. Your "index.html" Sublime 2 project file for some reason has to be in the same folder that the "img" folder is in: the folder named "websitewaters-island01-stage01". Just drag your "index.html" project file into the folder "websitewaters-island01-stage01". It worked for me! Tell me if this explanation makes sense.