araujophillips
araujophillips

Reputation: 342

Display image in web server <img>

I have multiple images in the following folder: /var/www/xxx/web/images/orders/712. The file name is: 1332_CARA_24_225_31654_thumb.jpg

I want to show it with an html label. I doing this:

<img src="1332_CARA_24_225_31654_thumb.jpg">

Where is the problem?

Upvotes: 2

Views: 7919

Answers (2)

Robert Hickman
Robert Hickman

Reputation: 1147

The path described in the IMG tag's SRC attribute is a relative path (unless you begin the path with a "/").

So if your HTML file is located in the same folder as the image, it should work. If, for example, your HTML file is located in the web folder, then your SRC attribute would need to be :

images/orders/712/1332_CARA_24_225_31654_thumb.jpg

Upvotes: 0

suff trek
suff trek

Reputation: 39767

Looks like .../web is pointing to your root so try following:

<img src="images/orders/712/1332_CARA_24_225_31654_thumb.jpg" />

Upvotes: 2

Related Questions