2

A couple of days ago I installed a LAMP server on linux mint 18. When browsing a simple html test file at localhost/prueba.html in which I attempt to display a .jpg file with < scr="name.jpg" alt="Name"> the browser will only show "Name", but not the image. The strange thing is that all permissions are granted to /var/www/html (path in which I keep the file prueba.html and name.jpg) and when I browse localhost/name.jpg the picture is displayed with no problem.

The prueba.html and name.jpg files are at the SAME folder. They Both have all permissions granted and are accesible by www-data.

Here is the html code:

<!DOCTYPE html>
<html>
        <head>
        </head>
        <body>
                <img scr="name.jpg" alt="Name" >  
        </body>
</html>

It seems to be a very simple problem, but I can't figure out what's wrong. I tried changing the path in the html file, using absolute path/relative path, adding/subtracting slashes "/" , but nothing seems to work.

Does anybody know why I'm unable to see the picture when browsing localhost/prueba.html?. Is there something regarding the apache2 configuration files that I'm missing?.

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
HKlas
  • 21
  • 1

1 Answers1

1
<img scr="name.jpg" alt="Name" > 

your code is wrong, it's src not scr

<img src="name.jpg" alt="Name" >  
Patrick Sampaio
  • 390
  • 2
  • 13