dak
dak

Reputation: 199

Why img src is not displaying my picture?

I'd like to ask you some question:

This is my img and the picture is not displaying. If I copy-paste the img src it shows me the the picture perfectly.

img class="featurette-image img-responsive" src="c:\users\dagmara\documents\visual studio 2013\Projects\leadMoves\leadMoves\Files\Pictures\1974302_10152306623778442_2059565629_o.jpg" alt="Generic placeholder image"

I've tried to replace blank spaces with %20 but it still does not work.

Any help would be greatly appreciated :)

Upvotes: 0

Views: 10739

Answers (2)

Billy Moat
Billy Moat

Reputation: 21050

You're referencing the image absolutely from your hard drive rather than relatively from the directory your website is in.

your image path should be something like:

src="../Pictures/1974302_10152306623778442_2059565629_o.jpg"

This will obviously depend on how your file structure is set up.

Depending on how your structure is set up you can also reference like so:

src="/Pictures/1974302_10152306623778442_2059565629_o.jpg"

Here's an article which might help:

http://css-tricks.com/quick-reminder-about-file-paths/

Upvotes: 2

Tuhin
Tuhin

Reputation: 3373

<img src="images/pulpit.jpg" alt="Pulpit rock" />

__WebContent
 |__index.html
 |__images
   |__pulpit.jpg

Upvotes: 0

Related Questions