3 ms·
Used to have a setup like this years ago but having a script that performs something heavy like image manipulation led to it being abused to ddos the server. Yo
by dawnerd 9y ago
Used to have a setup like this years ago but having a script that performs something heavy like image manipulation led to it being abused to ddos the server. You basically have to set predefined sizes but in that case you might as well render the images on upload and save all the versions.
- eknkc 9y agoWhat we do is to add a signature to url. For example image.jpg?w=500&sig=<hmac of w=500> so the server can validate that the request url originated from us and we can add more image sizes by just generating new urls with correct signature. This solves the abuse issue while providing the same freedom for image sizes. Edit: Also we use aws lambda for image resizing so scaling is not an issue and generated images are cached on s3. Storage is cheap.