Can I put imgproxy between spaces and the CDN?

Posted October 6, 2021 40 views
CDNDigitalOcean Spaces

I’m setting up an application where I need to upload and download images, I need to store the large original images and occasionally serve the full images via a direct download link, but more often I need to provide a small mobile/reduced sized version of that image.

I’m looking to use to do so, however I would like to also be able to still use the CDN to cache the images that come out of this resizing so I can serve the most commonly used, smaller images at the edge.

The goal is to proxy requests from client -> cdn -> imgproxy -> spaces so I always only serve the size I need, and I can cache it at the edge.

Currently from what I can see in the documentation, there is no way to place any processing between the CDN and Spaces, is this correct? Or is there some tutorial you can point me to, in order to show me how to configure the CDN to do so?å

Kind regards

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey @musojames,

Indeed as you mentioned, this is not possible as of the time being. But sounds like it’d be super useful!

The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.

For the time being, you could build this into your application logic and whenever your condition is met serve the images without going via the CDN: client -> imgproxy -> spaces.

Hope that helps!
- Bobby.