Best approach to serve image coming from FTP server?

Hi there!

I’m working on and I need to show an image coming from a webcam.
That image is updated every few minutes and is uploaded on an Aruba ftp server. Unfortunately this cannot be changed (for now)

How would you solve this using Netlify only (no external service), if possible? I thought of

  • lambda to pull the image and transform it accordingly
  • lambda + Netlify cdn? I’d use lambda just to expose the image from ftp and cdn to handle the transformation, but how would I control the cache?

Thank you!

Is it not possible to use an <img/> tag directly and specify the URL to point to that FTP server? Not sure how this is a Netlify question. How would you display this image on a site not hosted on Netlify? The same way should apply here as well.

Well the question is more about Netlify server-side features.

For now I solved the issue with a Netlify function to pull the image from FTP and an edge-function in front of the first one, just as a proxy, to support caching.

I was not able to use edge-function directly cause the library simple-ftp doesn’t work in edge function for some reason