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

Why are my photos broken in my html when is live

Dear people of treehouse,

I've typed the code exactly the same as shown in the video and for some reason the photos will not display in the live version. Could this be due to cookies. I've tried it in two web browsers (Google Chrome and in Safari) any tips or direction will help thanks a lot!!

7 Answers

Kevin Korte
Kevin Korte
28,148 Points

Your source paths to your images are very likely broken when you go live. Especially if you're using absolute paths.

Do you images show when you develop locally? Can you give us an example of an image source path you are using that breaks live?

<ul class="nav"> <li><a href="#">About</a></li> <li><a href="#">Cupcakes & Prices</a></li> <li><a href="#">Locations</a></li> <li class="last"><a href="#">Contact Us</a></li> </ul> <div id="intro" <h1>oppsites really do attract, especially in our kitchen! We combine unexpectied flavors that melt together to vreat ironially delicious desserts.</h1> <p><a href="#" Class="Btn">Browse Our Cupcakes</a></p> <div> <img src="img/you-bake-me-blush.gif" alt="You Bake Me Blush"

Kevin Korte
Kevin Korte
28,148 Points

And on your live server, from your root folder, you have another folder called "img" and a picture inside of that called "you-bake-me-blush.gif" all spelled and formatted exactly like that?

yes its the same. Ive even tried desktop/web/img/logo.gif. that didnt work .. could it be that Sublime 2 is an unregistered version?

Kevin Korte
Kevin Korte
28,148 Points

It shouldn't matter, as long as you can save your HTML file out of it, and upload that file to your server, that is all that the web browsers care about.

You said you're hosting this live, do you have a link we could view?

Lets talk over the email **************** ill send you the screenshot so you can get a better idea of where I am coming from.

Thank you for the help Best regards, Ray

alt text

Kevin Korte
Kevin Korte
28,148 Points

Hey Raymond, while I don't have an issue per say over email, taking it away from the forum loses the ability to help someone else down the road. Somebody else might have this same issue next week, and if it goes to a private conversation they won't get to see the solution.

You can post screenshots here. Just follow the code on how to post images in the Markdown Cheatsheet link just below the reply box.