aws-samples / aws-samples/image-optimization

converting image into buffer is too slow

Open
#32 5 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.