-
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
[gatsby-plugin-sharp] Error when using resize(base64: true) #19220
Comments
Thanks for the issue! Tagging my colleagues cc @gatsbyjs/core |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
@troyfendall Thanks for opening this bug! This is a simple one to fix. The error is at this line:
The fix is to change this line into async function generateBase64({ file, args = {}, reporter }) { There might be something else going on but this at least fixes the error. More detective work is appreciated 🕵🕵️♀️. |
This appears to have been fixed in #20158 thanks to @rileymiller Let's close this issue. Thanks everyone! |
Description
When trying to use the
resize
method fromgatsby-plugin-sharp
with a parameter ofbase64: true
I get the following error:Steps to reproduce
Reproduction repository: https://github.com/troyfendall/gatsby-plugin-sharp-resize-bug
Use the following query:
Expected result
What should happen?
A resized base64 image should be available for use and the build should succeed without error.
FWIW I traced through the
gatsby-plugin-sharp
code and found that defaultingargs = {}
on this line fixed the issue. Now, I don't know if the root issue is the lack of default or if there's an underlying issue that explains why the args are undefined there. Hopefully ya'll with better knowledge of the scheduler can decipher what's going on there.Actual result
Environment
The text was updated successfully, but these errors were encountered: