Setting my <img> source to a file path outside of flask static folder

人盡茶涼 提交于 2021-01-28 11:40:59

问题


I need to display some images and these image filepaths are outside of flask's static folder stored on on network folders.

<img src="{{ filepath }}"> # /some/external/network/folder/img.jpg

However this is not working and I get a broken image icon, however I can paste the image path into my browser and confirm its accessible. I need this application to be able to accept image sources from anywhere, so I can't update my static folder to the network folder. I also can't load the images to the server because there would be about 20,000+ photos.

Is there a way to get this to work?

来源:https://stackoverflow.com/questions/55862094/setting-my-img-source-to-a-file-path-outside-of-flask-static-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!