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
vellon rasmos manzvanda
8,012 Pointslinking images
hie guys can anyone help? i am using sublime text 2 for my practice in front end web development but i cant link images and photos in my hard drive to my project. how do i go about it?
2 Answers
blake guyan
8,297 PointsJonathan is probably right, they look like the likely offenders. another one might be how you are referencing the files. if the files you are linking to are in the same folder as the page it will work if you call them directly like this
src="/picture.jpg"
but if the file is in another location you need to use the actual address on the drive
src="c:/folder/picture.jpg"
that one can catch you out at times. TBH when i am developing something i tend to create a working folder with all the images in that i want local to the page so all i have to do is call the folder and image.
like this
src="pictures/picture.jpg"
vellon rasmos manzvanda
8,012 Pointsthanks guys i did put them inside the same folder and it worked
blake guyan
8,297 Pointsawesome :) glad you sorted it
Jonathan Grieve
Treehouse Moderator 91,254 PointsJonathan Grieve
Treehouse Moderator 91,254 PointsHi Vellon,
Could you post your code to the forum, particularly your attempts to link images to your project.
Until then I can only guess what might be going wrong e.g.
srcattribute