1

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?

Ari
  • 5,301
  • 8
  • 46
  • 120
  • "this is not working" What error do you get? What do you mean you can't load images to the server? Are there outside flask's static folder or not on the server? – Adrian Krupa Apr 26 '19 at 07:30
  • @AdrianKrupa No errors, the images are broken and do not display, but I have confirmed the filepaths to the images are correct by inspecting the img element and pasting the filepath into my browser. The application will be running on a local server and will access folders located on another server. – Ari Apr 26 '19 at 10:08
  • Does this have anything with flask? Just set `filepath` to image resource on another server. Flask statics have nothing to do with it. – Adrian Krupa Apr 26 '19 at 10:13
  • Setting filepath outside of the static folder does not work. This is only an issue I'm having with files in Flask projects, that are not in the static folder. I can't even link an image from Imgur or Google, it seems to only want to use images in the static folder. – Ari Apr 27 '19 at 00:13

0 Answers0