Customizing lambda template to pull image from url instead of S3 bucket #493
-
Hi! I am wondering if it is possible to use this template and customize it so that the "original image" is not stored in an S3 bucket but instead comes directly from a URL. I am currently using Cloudflare image resizing feature which I would like to replace with a setup on my AWS account. The template for image handling has almost the needed behavior except that the image is expected to be already stored in an s3 bucket, whereas on Cloudflare I can pass an IPFS URL directly (no original image storing needed). Is it feasible to customize the lamba part of the template to have this behavior? Looking at the code I am thinking about trying to change the getOriginalImage function. Did anybody implement something like that? Looking forward to your insights! Cheers! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For anybody looking at this later: I have successfully implemented similar changes as this fork: https://github.com/stocktwits/serverless-image-handler to take in a URL. |
Beta Was this translation helpful? Give feedback.
For anybody looking at this later:
I have successfully implemented similar changes as this fork: https://github.com/stocktwits/serverless-image-handler to take in a URL.
Now, I am trying to figure out how to increase the lambda response payload limit (6MB) for big images by updating the handler function in image-handler/index.ts to stream responses to benefit from the 20MB payload limit.