GraphQL error, failed to process image Response code 404 (Not Found)

Hey, hey!

I got many times on many different blog post the following error:
error There was an error in your GraphQL query:

9:19:08 AM: Unexpected error value: "failed to process https://images.prismic.io/<URL>.jpg?auto=compress,format\nHTTPError: Response code 404 (Not Found)"

Gatsby graphql query:

9:19:08 AM: > 54 |             imageSharp {
9:19:08 AM:      |             ^
9:19:08 AM:   55 |               childImageSharp {
9:19:08 AM:   56 |                 fluid(maxWidth: 836, pngQuality: 100) {
9:19:08 AM:   57 |                   ...GatsbyImageSharpFluid
9:19:08 AM:   58 |                 }
9:19:08 AM:   59 |               }
9:19:08 AM:   60 |             }

I tried removing and selecting the images again from the prismic library and it failed many times and eventually it worked by renaming the image extension from .jpg to .JPEG. I honestly don't think it was related to the extension filename, because gatsby-plugin-sharp is supposed to handle both extensions cases.

I'm using:

Apart the fact I should migrate to GitHub - prismicio/prismic-gatsby: Gatsby plugins for building websites using Prismic is it an issue some others people encountered?

I found that on Birkir's old-official gatsby plugin, but it's slighty different error regarding caching folder Unable to build because of an image fetching / caching error · Issue #162 · birkir/gatsby-source-prismic-graphql · GitHub so I don't think that's related to my above error message

Cheers

Hi Jérémy,
Welcome to the Prismic community,
Well, Prismic doesn't support any more the birkir/gatsby-source-prismic-graphql plugin,

I think that the issue you are having is related to the fact that you are using the gatsby-plugin-sharp plugin that does the same job for optimizing images as Imgix that Prismic uses behand the sense that's why optimizing images can timeout some times.

We recommend you to use the Imgix plugin instead that will have more compatibility with Prismic.

Best,
Fares

Thanks Fares,

That's a great tip, and would explain why I have some weird image result, because it would go twice in an image optimisation step. I will figure it out to use this plugin instead.

Thanks for the quick response,

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.