i'm using Flask with Python and want to insert an Image.
That works fine with following command:
{{ url_for('static', filename='path/to/img.jpg') }}
But now i want to insert an image in a loop (like for articles) and need the path out of a variable like:
{{ article.header_img_path }}
How can i insert a variable path into the
{{ url_for('static', filename='path/to/img.jpg') }}
command?
Something like that:
{{ url_for('static', filename=' {{ article.header_img_path }} ') }}
Is there a better way to do that or is just my syntax corrupt?
Thanks for your advise!