I've tried every single possible approach, where both my image file and html file are located within the same directory, as so:
project
|
templates
| |
image.jpg profile.html
It is not a capitalization or misspelling issue, both the names are the same.
It is not an absolute or relative path issue, as I've tried:
<img src="./image.jpg">
and
<img src="/image.jpg">
and
<img src="http://localhost/project/templates/image.jpg">
and any combination thereof.
When using the localhost source path, the image attempts to load on the website, where there is a blank space, and only after several seconds does it display the image not found icon. In the case of using relative paths without localhost, the image not found icon displays immediately.
I've tried to use absolute paths as well, which also did not work.
I've looked through 30 different SO threads so far, and have not found a single solution that works. Does anyone know what I could possibly do in order to fix this?
I'm speculating that it has something to do with permissions or possibly the settings of something I'm using.
- PyCharm - Python 3.9
- Flask
- HTML and CSS
Please let me know if you need any additional information at all from me, thank you in advance!