简体   繁体   中英

How can I display an image from a link in Flask?

Let's say I have an image link: https://i.imgur.com/pPMi9ES.png

In my index.html the I have an HTML img element as following, but the image is blank after all.

<img src="https://i.imgur.com/pPMi9ES.png" width="400px" height="300px"/>

How can fix this?

if you are working on local server and have address like this 127.0.0.1 try changing it to localhost. It worked for me.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM