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

John Lukacs
John Lukacs
26,806 Points

Displaying images

My pictures are not showing up. I am using brackets as my text editor I just switched from dreamweaver I drag and dropped an image from my desktop to the editor then wrote the code <img src="image.jpg" alt="img"> it does not work what am I doing wrong?

John Lukacs
John Lukacs
26,806 Points

!`~~~ html <img src="image.jpg" alt="image">

```It not allowing me to show code

3 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

Hi John,

When you drsagged your image into a your text editor, did it go into a particular folder?

<img src="img/image.jpg" alt="img">

If it has you'll need to specify that directory. Look for the image in your project folder.

If you're linking an image that's in a different file path to your html file you can get it by adding 2 dots and a forward slash, like this

<img src="../img/image.jpg" alt="img">
John Lukacs
John Lukacs
26,806 Points

Its not in any folder.
I created a folder but it won't allow my to put anything into it I've tried everything I can think of specifying all kinds of paths I want to take my head and put it threw my computer

John Lukacs
John Lukacs
26,806 Points

Im going back to dreamweaver this is stupid

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,253 Points

It should work the same way in brackets if you type the code as you would in Brackets or any other text editor. Just remember image paths in HTML dociments are relative the location of the containing file.