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

Smells Like Bakin imgs

Hi all,

I downloaded the file that had all the IMG's for Smells Like Bakin. I moved them all over to their own folder on my macbook, but I didnt change the names(logo.gif is still the same). When I go to the code in for the img tag, it still comes up with a question mark. Can anyone help me?

17 Answers

Did you change the path (src) of the image? If you put them in the img folder, you have to to state "img/logo.gif" or if you put it in folder1 you have to state "folder1/logo.gif".

the path to it from my desktop is smells-like-bakin/img/logo.gif and it doesnt respond when i put it in that way

is your index.html in your "smells-like-bakin" folder?

now it is. it was outside of the file, but I put it in there. Let me see if that works.

Alfred it didnt work.

Please make sure this is the case: 1) index.html is in your "smells-like-bakin" folder (directly in it, not any subfolder like "img". 2) logo.gif is in your "smells-like-bakin/img" folder (img folder is a subfolder of smells-like-bakin folder) 3) the image path in your index.html is src="img/logo.gif"

you need to put the pictures inside the "img" folder.

I have it in an img folder. the path from my desktop to the img is smells-like-bakin/img/logo.gif and it still wont recognize it.

could you please show me your code you've done.

Ive tried to follow the stylesheet below to post code on here and I cant even figure it out. Im a total newbie at this stuff.

Instead of using the smells-like-bakin/img/logo.gif why don't you try and remove the smells-like-bakin part and try and work with img/logo.gif instead, and see if that helps?

Hi Matt, is your .html file in a folder, or is it sitting on your desktop?

the index.html? its in my img file on a tip from alfred just now but it didnt work.

you need to put your index.html file in the "smells-like-bakin" folder. not the img.

If i read your thread correctly you will need to put your index.html in its own folder. but you will also need to put your image folder inside the folder that has your index.html. Hope that made sense?

right now I have a Smells Like Bakin file, and inside of that is the following: IMG, CSS, and index.html. Thats how it should be?

I have a screen shot of how I have it, but I dont know how to post it.

you can show your code using codepen

Thanks to Elliott, here is my code on Codepen.com

remove the forward slash at the end of your image tag.

did that, still got the question mark

so just to recap your index.html file is in the "smells-like-bakin" folder and your images are in the "img" folder, right?

yes. "smells-like-bakin" is my main folder. In it is the index.html, img, and css and the respective files for each one.

well the code looks fine, it must be somewhere in your directory because it's working fine when I insert my image. see for yourself

do you have an idea for me to fix the directory?

I'll be thinking of it while I eat dinner.

Cool, thank you. I think I read in other threads this would be my issue but I wasnt sure, so I wanted to post and see.

Make a new folder on your desktop called "home", then create another new folder inside the "home" folder called "img", then move your index.html to "home", and move your logo.gif to the "img" folder.

will the code the be home/img/logo.gif or just ing/logo.gif?

<img src="img/logo.gif">

<img src="img/logo.gif">

Ill give this a try, thanks!

no prob! hope it works!

did it work?

Could you give us a screen shot on your file are layout .

I have a screenshot but no clue how to post it

  1. Go to imgur
  2. Click on Computer
  3. Select the image you saved when taking your screenshot
  4. Post link to the image here

Here is a screenshot of the path

Here is a better screen shot

So this should work:

<img src="img/twitter.gif">

I dont know what I did but it works! Thank you everyone for your suggestions!