The problem: I get a 404 when I access static resources from any route other than '/'
.
I have an image called volume.png
in my static
folder in my Flask
application. When I route my main page to '/'
using @app.route('/')
it finds the image fine, and I can display the image when I hit localhost:5000/static/images/volume.png
. But when I use any other link, for example, '/s'
, it says it can't find the image in s/static/images/volume.png
. Even when I create an s
directory and copy the static
directory to it, I get a 404
when I type localhost:5000/s/static/images/volume.png
. I've considered using Flask-Assets
, but there doesn't appear to be much documentation or examples. What's a good way to make sure my routes have access to the static resources?