Gatsby build issue with image referenced in MD file

  • Site name: joyful-shortbread-67b3e5
  • Deploy log: Netlify App

Hi there,

I am trying to deploy my Gatsby site to Netlify for the first time. It keeps getting hung up on processing the image that is referenced in my markdown file’s frontmatter to webp. Error output:

8:13:57 PM: error Processing /opt/build/repo/content/blog/2020-4-18/images/7.jpg failed
8:13:57 PM: Original error:
8:13:57 PM: spawn /opt/build/repo/node_modules/cwebp-bin/vendor/cwebp ENOENT
8:13:57 PM:
8:13:57 PM:
8:13:57 PM: WorkerError: Processing /opt/build/repo/content/blog/2020-4-18/images/7.jpg failed
8:13:57 PM: Original error:
8:13:57 PM: spawn /opt/build/repo/node_modules/cwebp-bin/vendor/cwebp ENOENT
8:13:57 PM:
8:13:57 PM: - jobs-manager.js:294 exports.enqueueJob
8:13:57 PM: [repo]/[gatsby]/src/utils/jobs-manager.js:294:23
8:13:57 PM:
8:13:57 PM:
8:13:57 PM: not finished run page queries - 2.056s
8:13:57 PM: not finished Generating image thumbnails - 2.007s

I have set up gatsby-file-system to reference the image from an images folder on the same level as my markdown file (/content/blog/2019-3-22/images/7.jpg).

    {
      resolve: 'gatsby-source-filesystem',
      options: {
        name: 'blog',
        path: `${__dirname}/content/blog`,
      },
    },

In my markdown file, I reference the image relative to the MD file like so cover: './images/7.jpg' and get the path in my post template using the page query.

I followed this Gatsby tutorial closely and it works fine on develop and build locally. I can’t figure out what this issue is while deploying to Netlify. There aren’t a lot of hints online pertaining to this issue, what am I missing?

Thank you for the assist in advance!

Warmest regards,
Richard.

Hi there @Shaderpixel ! I did take a look at your build logs and it looks like you are using a very old version of the Gatsby plugin, and this can cause issues with building the site. Can you try installing the latest version and try again to let us know if that helps? Here’s a link to the repo with the instructions for installing the plugin:

Hi @amelia You are right, about the old version of Gatsby plugin stopping the build process. I was able to build my code with v3 and it has since updated to v5. I held off updating for a long time because I couldn’t find the time to keep updating Gatsby since I can only work on my site when I have time. So I decided to peg the version. Now that site has been launched I will keep it up-to-date. Thank you for your help.