Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML How to Make a Website Creating HTML Content Add Image Gallery Content

Matthew Goodman
Matthew Goodman
12,786 Points

photo wont load on preview mode just shows tiny box item, was using Firefox now using Google chrome, still no change

photo wont load on preview mode just shows tiny box item, was using Firefox now using Google chrome, still no change not sure what I need to do.

26 Answers

Hi Matthew,

Can you show the code you're using, please?

Cheers,

Steve.

Matthew Goodman
Matthew Goodman
12,786 Points

hi there the code:

<ul> <li> <img src="img/Desret.jpg" alt=""> </li> </ul> its not from what they ask you to download its one on my laptop, thanks for the help.

OK - that's a bit hard to help, then. However, have you checked the spelling of the file name?

make sure your own images are in the 'img' folder on treehouse workspaces (drag and drop into the dark square box underneath file list and then once it is in workspaces move it to the img folder. <img src="img/filename.jpg" alt="a picture">

Matthew Goodman
Matthew Goodman
12,786 Points

they are i have checked spellings the lot, even tried to download img nick says you can use just wont let me do it. its not even letting me drag photos over to upload now? thanks for helping me.

Good idea, yes.

is it the right file extension -jpg/png are caps on or off in the right places .. You probably checked all that - is just the sort of mistake I normally make.

Matthew Goodman
Matthew Goodman
12,786 Points

I have many many times, my img goes in there shows up as being there when i click img but when I go to preview nothing only the little box where you know a photo or broken link ?

Matthew Goodman
Matthew Goodman
12,786 Points

only jpg as new whats the png part mean, my img only showing as a jpg not the png?

have you tried another image just to check if it is the image itself ?

is it jpg or JPG ?

Matthew Goodman
Matthew Goodman
12,786 Points

no still nothing its jpg not JPG spellings correct could my browser stop it loading?

Matthew Goodman
Matthew Goodman
12,786 Points

<li> <a href="Desert.jpg"> <img src="img/Desert.jpg.jpg" alt=""> <p>This Photo wont load why not??</p> </a> </li>

does it work in another browser ? I wouldn't think that would affect it.

your href ..the 'img' bit is missing

Matthew Goodman
Matthew Goodman
12,786 Points

nope i was using firefox then went to google chrome still the same

you have also written 'jpg' twice on your file name in img src

Matthew Goodman
Matthew Goodman
12,786 Points

i think that was me just now give me a min if you dont mind please

I take it the opening list tag <li>is there just not in your shot.

Matthew Goodman
Matthew Goodman
12,786 Points

ok I have no idea what I just did went over the video again was all correct from what I could see, the I removed the / forward slash and put it back in reloaded it, and its worked?? no idea what I did, did I put a space in it. no from looking at the code I posted up here no space but its working.. thanks you so much for the help

the first shot you showed said Desret the 2nd says Desert .. also is the first letter of your filename actually a capital letter ?

Glad it's fixed ! Yaye!!

Matthew Goodman
Matthew Goodman
12,786 Points

I know that was me trying spellings the lot, thanks again.

your welcome :)

Great work - glad that's fixed!

I went through a whole new course a week ago to QA test it prior to release. I kept reporting problems with it but, as is usual with me, it was user error - I'd not refreshed the page. Oops!

Matthew Goodman
Matthew Goodman
12,786 Points

you know I did refresh many times, might just be this out of date laptop takes about 10 days to get going. and yeah it could just be me I was doing Java before but I am starting with some web dev them moving along.

Good luck with it all and if you get stuck, just shout in the forums. We're all here to help as best we can.

Steve.

Hi All, I've just had the same issue; the video shows the name of the file as img/numbers-01.jpg but the downloaded files are Img/numbers-01.jpg the capital i appears to be causing the problem

Would this generate a 404? Thanks C

you could rename the file .

I've just realised I created the file! My fault.. Thanks C

im also experiencing this problem. it could be a really tiny mistake on my part but could use a bit of help.