Recently, I have started learning html and css to experiment making webpages with flask. Everything has been going great except for the tag.
I can't seem to make the images show up on index.html when accessing through localhost:5000 or IP when accessing from different devices in the network. However, I can see the exact images when I open the index.html file itself on chrome.
Here's how my directory looks like:
Flask
|
|---templates
| |
| |---index.html
| |
| |---img
| |
| |---slideshow
| |
| |---1.jpg
|
|---static
|
|---app.py
|
|---forms.py
|
|---models.py
|
|---routes.py
and here's my img tag in the index.html file
<img src = "img/slideshow/1.jpg" style = "width:100%">
I have tried moving the 1.jpg around the directory and even put it in the same folder as the index.html (using only 1.jpg in the img tag), but I know for sure my current path in the img tag is correct since I can see the images when i open the index.html individually.
I have also tried looking at the permissions of the images already and all are allowed already.
Do i have to add something to this code in my route.py?
def index():
return render_template('index.html', custom_title = "Home")