Solution for HTML/Flask Image is fetched as json instead of png
is Given Below:
I have a flask app that displays two images from the static folder:
<img src="{{ url_for('static', filename="folder/image_1.png") }}">
<img src="{{ url_for('static', filename="folder/image_2.png") }}">
Both images render properly locally. Yet when I deploy it to AWS via Zappa, the second image doesn’t render. Browser network inspection shows that the image_2
is being fetched as json instead of png with the return status of 502.
Any idea how to fix it? Thank you!