Answer the question
In order to leave comments, you need to log in
How to make Flask honor image path changes?
Build an app in Flask. The application contains html, css, js files. css and js files are located in app/static/css and app/static/js. The images are located in app/static/images. In one of the css files I specified
background-image: url('app/static/images/like-active.svg');
background-image: url('/static/images/like-active.svg');
Answer the question
In order to leave comments, you need to log in
1. Check if there is still a picture there.
2. Look at the statics settings (have you overridden something, it happens, yes)
3. In a good mood in general, so that nginx manages the statics, if this is not the case already.
Yes, by the way, I climbed into the project at hand to look, does the url look like this (malol) and everything is exactly like that. Works even on local (where there is no nginx).
Relative path background-image: url('../images/like-active.svg'); tried?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question