I am attempting to load an image, located at
/tmp/sample.png
The image is there, and I can cd into the folder and see it. However when I type
<img src="/tmp/sample.png" alt="Sample Image">
The alternate text is displayed instead of the image. However, if I move the image to my current directory and use
<img src="./sample.png" alt="Working image">
This works perfectly.
What am I missing in the absolute filepath?
Note: I have tried
<img src "http://localhost/tmp/sample.png">
<img src "tmp/sample.png">
<img src "../../../../../tmp/sample.png>
with no luck. I have also attempted the strategies listed in the duplicate post, those do not work for me either.
Edit:
/
home
--> user
------>PycharmProjects
---------->webapp
-------------->dashboard
------------------>hud.html
tmp
--> sample.png
Hope this helps.