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

CANT GET PICTURES TO COME UP ON PRACTICE WEBSITE

HEY GUYS,

I am currently on text editors and HTML, i have been following the videos and everything looks great aside from the pictures for the cupcake website. Im sure if i download them they won't work can anyone give me a suggestion> i am using sublime text. How can i get the cupcake images to come out on my practice website.

the video series i am in is under Text editors and HTML and the video is Finishing HTML. thanks again guys

3 Answers

You need to ensure the images are on your system in the same place as you tell the browser they are going to be in your code. Take this for example

This is your project folder location

c:\adam\sites\bakin\

This is where you tell the browser (in HTML) where the image is located

<img src"img/logo.png">

This will tell the browser to look in the folder where the index.html file is located then head to a folder called IMG and then will look for a file called logo.png.

Your folder should be something like

project_name
-css
--styles.css
-img
--logo.png
index.html

Thanks

Sven Lenaerts
Sven Lenaerts
4,644 Points

Hey Jose, make sure you specified the path to the image correctly. For example if your folder consists out of a index.html file and a folder called 'images' with the image cupcake.jpg in it, your path should look like this:

<img src="images/cupcake.jpg" alt="a picture of a cupcake"/>

how can i find out where the images are at? what i mean is the location text. i can obviously pull them up under my finder window on my macbook pro. but how can i find out what i need to type into HTML to be able and use the images i downloaded? i hope my question makes sense,

then again its probably something that i saw already just haven't slept for 2 days now. Thanks for any comments guys.

Well you would know the location as that is where you saved them but for consistency you should keep them inside the project-folder inside a folder called img or images that way you always have to write the same link location and change the file name accordingly.

As for what you need to type for HTML it is just the path to tell the browser where that file is.

thanks adam i appreciate it

No problem any other issues you may run into then tag me in a post on here or add me on twitter @Sacki2013 and give me a shout. Also if this issue is closed click the best answer button to mark as solved Jose Ivan Perez