aws-samples / aws-samples/image-optimization
converting image into buffer is too slow
Open
- Dominant language
- TypeScript
- Stars
- 276
- Forks
- 151
- PR merge metrics
- No merged PRs in 30d
Description
I did some tests with 10 MB images and noticed that the function ```transformToByteArray``` takes 0.5 seconds to 1 second to convert the image stream to a buffer. Sharp supports streams, could we try compressing images without turning them into buffers?
https://github.com/aws-samples/image-optimization/blob/259f680c212006ffca08a90824207bd8123a7803/functions/image-processing/index.mjs#L36
Contributor guide
Assessment
This issue has not been assessed yet.