Closed bwlt closed 4 years ago
This is causing a new error for us. @bwlt Can you explain why this is needed? I had no issues with using images with Gatsby before this PR.
We seem to only get this error with images with UTF-8 characters like the swedish 'åäö'. We get this error:
ERROR #85901 GRAPHQL
There was an error in your GraphQL query:
Unexpected error value: "wrong url: https://images.prismic.io/{reponame}/ed3d852f-cf8b-4a36-9a04-ae7d18524e44_LindaÅkerberg_SUP.jpg?auto=compress,format"
92 | }
93 | }
94 | }
95 |
96 | fragment ImageFragment on PRISMIC_ContentBodyImage {
97 | type
98 | primary {
99 | image_variant
100 | image_caption
101 | image_image
> 102 | image_imageSharp {
| ^
103 | childImageSharp {
104 | fluid(maxWidth: 1900) {
105 | ...GatsbyImageSharpFluid
106 | }
107 | }
108 | }
109 | }
110 | }
111 |
112 | fragment FeatureFragment on PRISMIC_ContentBodyFeature {
File path: /../src/templates/content.js
Url path: /da/...
Plugin: none```
@sebastiansson didn't inspected much on this 😅 The build failed to me, so in my company we were relying on the previous PR https://github.com/birkir/gatsby-source-prismic-graphql/pull/89 (this PR is simply a port of #89 ). Maybe @rdanchev have more information on this
@bwlt Thanks for the response. Would be great if @rdanchev or @adnsio could explain this more. Really hard to follow what's happening here.
Impacted by this change as well on 3.5.0. Here's what I'm experiencing.
Error when running Gatsby, similar to @sebastiansson :
Unexpected error value: "failed to process https://images.prismic.io/{my repo name}/{my image name}.jpg?auto=compress,format
\nError: ENOENT: no such file or directory, open '{my project path}/.cache/caches/gatsby-source-prismic-graphql/tmp-c6ab15163d8b1a70ade6b1229b8b21bb.jpg'"
It looks like images aren't getting saved to cache in .cache/caches/gatsby-source-prismic-graphql.
Prismic returns "percent-encoding" image urls, files were saved by Gatsby but could not be used.
Example
Before the fix:
With the fix: