-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gatsby-plugin-sharp): Use file streams instead of file paths #33029
Conversation
47a5d8e
to
31cfaf3
Compare
Nice! Might reduce memory usage perhaps depending on how Sharp does things |
Good point, we also use the function in |
I reverted async change to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Description
Converts sharp usage based on file paths to file streams, e.g.
For the writing of files we use
sharpPipeline.toBuffer() + fs.writeFile()
for now. We probably will change it to filestream in future PR (will just need to revert 31cfaf3).Running the
image-processing
benchmark didn't show any major speed improvement/degradationRelated Issues
[ch37488]