0

I have a simple html file as follows:

<!DOCTYPE html>
<html>
    <body>
        <img src="images/test.png" alt="Your Image">
    </body>
</html>

My directory structure looks like this:

|   test.html
|   
\---images
        test.png

I fire up live-server from my Powershell 7 command line like this:

live-server .\test.html

It loads up without any problem, but the image does not appear in the rendered html. I have tried all variations of forward and backslashing in the file path provided to the src parameter but it doesn't help.

There is also an issue about this on Github but which hasn't received any follow up.

How can I get local image files to render in the web page rendered by live-server?

user32882
  • 5,094
  • 5
  • 43
  • 82

0 Answers0