How to resize images on Spaces


I just want to use Spaces like that;

and it will give me cropped image as values.

How can it be possible? We can make it on AWS, but couldnt find any configuration field on Spaces.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Hi, if Spaces supported redirect bucket lifecycle rule you could redirect the request on a missing resource like to

which could be a serverless application that would resize, serve and store missing image transformations on the fly. Ideally, this app should also check for allowed image transformations (e.g 1980x1020, 1024x768) to avoid some security issues.

Another solution would be to configure bucket with a custom subdomain like and put it behind Cloudflare. Cloudflare offers service called Workers which can execute some logic per each request. You can also resize images with workers.

If somebody has solved this issue elegantly please share;)

I’m also seeking for a similar solution but i’m afraid that is not possible with DigitalOcean Spaces :(