Issue building Gatsby v2 with Gatsby-Image and Ubuntu 20 - Related to LFS

To whom it may concern,

After updating some sites to the new default Netlifty image - Ubuntu Focal 20.04 -, they have stopped building with the following error.

11:19:49 PM: error #11321 PLUGIN Input file contains unsupported image format
11:19:49 PM: "gatsby-plugin-manifest" threw an error while running the onPostBootstrap lifecycle:
11:19:49 PM: Input file contains unsupported image format
11:19:49 PM: See our docs page for more info on this error: https://gatsby.dev/issue-how-to
11:19:49 PM: 
11:19:49 PM: 
11:19:49 PM:   Error: Input file contains unsupported image format
11:19:49 PM: 
11:19:49 PM: ​
11:19:49 PM: ────────────────────────────────────────────────────────────────
11:19:49 PM:   "build.command" failed                                        
11:19:49 PM: ────────────────────────────────────────────────────────────────
11:19:49 PM: ​
11:19:49 PM:   Error message
11:19:49 PM:   Command failed with exit code 1: gatsby build (https://ntl.fyi/exit-code-1)
11:19:49 PM: ​
11:19:49 PM:   Error location
11:19:49 PM:   In Build command from Netlify app:
11:19:49 PM:   gatsby build

It builds locally, and with Xenial 16. With Focal 20 it fails.

Is possible that it may be related to LFS? Could I disable LFS for a site to test? Hyphotehsis based on "Error: Input file contains unsupported image format" on Netlify (works locally) Β· Issue #2591 Β· lovell/sharp Β· GitHub

The other issue could be related to Sharp on Focal 20? :thinking:

Hence, one idea is to disable LFS and test it. Would it be possible?

1 Like

Hi, @PolGuixe. Is the environment variable GIT_LFS_ENABLED=true configured for the Focal build?

https://docs.netlify.com/configure-builds/environment-variables/#netlify-configuration-variables

If not the LFS pointer is downloaded and not the actual image file.

Would you please test adding that environment variable (in the web UI and not in netlify.toml)? ​Please let us know if that doesn’t resolve the issue or if there are other questions.

Same issue here. Unfortunately, adding the GIT_LFS_ENABLED env variable set to TRUE didn’t do the trick. Any other idea?

Hi, @angroup. What is the subdomain of the site which isn’t working (or the site’s API ID if you don’t want to share the subdomain)?