Skip to content
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

fix(sharp) wrap sharp calls in try/catch to avoid crashing on bad images #28645

Merged
merged 2 commits into from
Jan 14, 2021

Conversation

nategiraudeau
Copy link
Contributor

@nategiraudeau nategiraudeau commented Dec 15, 2020

Description

Adds try/catch blocks where gatsby-plugin-sharp reads and writes images.

Documentation

gatsby-plugin-sharp documentation.

Related Issues

Fixes #28640

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Dec 15, 2020
@nategiraudeau nategiraudeau marked this pull request as ready for review December 16, 2020 01:33
@LekoArts LekoArts added topic: sharp and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Dec 17, 2020
Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this!

@KyleAMathews KyleAMathews merged commit 004acf0 into gatsbyjs:master Jan 14, 2021
vladar pushed a commit that referenced this pull request Jan 16, 2021
…ges (#28645)

* added try/catch blocks around image processing

* fixed return on getImageMetadata

(cherry picked from commit 004acf0)
gatsbybot pushed a commit that referenced this pull request Jan 16, 2021
…ges (#28645) (#29052)

* added try/catch blocks around image processing

* fixed return on getImageMetadata

(cherry picked from commit 004acf0)

Co-authored-by: Nate Giraudeau <50968964+nategiraudeau@users.noreply.github.com>
@vladar
Copy link
Contributor

vladar commented Jan 16, 2021

Published in gatsby-plugin-sharp@2.12.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrap sharp calls in try/catch to avoid crashing on bad images
4 participants