-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[gatsby-image] Image data not loading during build/develop #9818
Comments
I started seeing this issue recently as well. I'm using the Prismic headless CMS as a source, but I'm seeing the same error. What fixed it for me was deleting the image causing the issue inside the CMS and uploading the same image again, for whatever reason. I did some research and found another user that started having similar issues recently, on Spectrum.
|
I have a feeling this might be a duplicate of this bug #9834 which provides a better explanation of the problem. |
After #9835 was merged (part of #9834) I've updated the gatsby-source-drupal plugin, and am still experiencing this same problem. And, with further debugging it resembles what @mthariath is saying above. The images used to all work. And now some of them do, and some don't. I haven't tried deleting and re-uploading the image to Drupal. But, I also shouldn't have to do that to get Gatsby working. I've tried removing the /public and /.cache directories and running Let me know if there's any other information I can provide to help debug this further. |
Yes, we are experiencing the same issue with the drupal pugin. Even if this #9834 got merged, I don't have access to @pieh has my data source API, if it helps to debug this issue |
@dcorb is this still an issue for you? it seems to be working fine for me. |
@hanoii @pieh @eojthebrave we found the root of the problem in our case. If you have basicAuth set up, it was not been used when fetching images. This PR we created (already merged) fixed it #10302 |
I'm having this issue as well. I built an example site using the default starter and this plugin early this week. I have a Drupal site set up locally (With Drupal VM) which has the Gatsby is version I am not using basic auth (shield). I wonder if this is a timeout issue with the I'm seeing that the first few recipes are pulled in with linked images. If I delete the cache, sometimes only the first few images are created in the cache directory and sometimes more. Since I did not use the Drupal example directly, I created it myself along the way, but it is very similar. I'm not sure how much my specific code matters because I have the same issue in GraphiQL. |
@mthariath this "fixed" it for me. Can confirm I started having the same problem, localFile being null. |
Also running into this issue. Deleting and reuploading every image we have in our CMS (Prismic) isn't viable. Is there a fix in the works / do we know what the actual problem is? Seemed to just break overnight, no major version bumps or anything. |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open! Thanks for being a part of the Gatsby community! 💪💜 |
Also running into this issue. Please do not close the ticket. Deleting and Reuploading the image is not working nor is a good solution... Is there a fix to this problem yet? Specifically, localFile returning null and not showing up on GraphiQL Environment gatsby: 2.0.88 |
Seconded. Same problems as above with gatsby I'm having to skip the gatsby-image plugin altogether. I can't get it to work on multiple files. it's a real bummer. same errors as above although with contentful. I even get the error trying to query via file{relativepath: {eq "pathnane" ..... there is def an issue. would love to have it resolved. I can't figure it out |
Exact same issue here, but I'm using NetlifyCMS. It seems to happen randomly. Sometimes messing around with the plugins order fixes the issue temporarly, sometimes it doesn't. |
Hi! Can anyone provide us with a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it. If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look. Thanks for using Gatsby! 💜 |
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 30 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Hey again! It’s been 30 days since anything happened on this issue, so our friendly neighborhood robot (that’s me!) is going to close it. Thanks again for being part of the Gatsby community! 💪💜 |
warn [gatsby-plugin-image] No data found for image |
@MoinShaikhSquare Experiencing the same, did you managed to fix it ? |
Hello team and everyone here, I just came here while I was following the Tutorial from the Gatby's home page, on Part 3 using The file loaded from https://pbs.twimg.com/media/E1oMV3QVgAIr1NT?format=jpg&name=large is not a valid image type. On the browser don't have errors, but 2 warnings: The code is exactly the one from the Gatsby's tutorial page. I tried removing node_modules, cleaning the cache and also with another image from unsplash and the same. |
I have same issue, anybody found any solution? |
Your solution for this problem, as facetious as it seems, is to stop using Gatsby. Check out NextJS or Remix, they have all of the same features, and more. Using Gatsby for multiple client websites has been the bane of my existence. COUNTLESS hours lost trying to figure out the very same issues you're having., while looking like a fool and losing business. It's a useless library/framework at this point, serves no purpose but to waste your time and make you look stupid to your clients. Notice how this issue has been happening for 3+ years. They don't care. |
Description
I'm using the
gatsby-image
,gatsby-plugin-sharp
, andgatsby-transformer-sharp
plugins to work with images imported from a Drupal backend. Up until a couple of days ago this was working fine. At some point I stopped and restartedgatsby develop
and things just stopped working.The issue is related to images imported from Drupal, and specifically, an error where
props.image.localFile
is undefined in my component and causes the page to not display at all. (I can add a conditional to fix that, but it doesn't resolve the fact that the image should be there.)I'm using this query in a template component, and it always returns null for
image.localFile
In GraphiQL I can run the following query, and I see the data I would expect:
I've tried things like removing node_modules/ and re-installing. And removing the .cache/ directory. So far that's not made any difference.
I can see that the files exist in public/static/*, and map to the paths I see when running the query in GraphiQL. Permissions on the image files seem fine.
Steps to reproduce
Here's the code I'm using: https://github.com/LullabotEducation/gatsby-drupal-examples/tree/dealing-with-images
Specifically https://github.com/eojthebrave/gatsby-drupal-examples/blob/dealing-with-images/src/templates/recipe.js, and https://github.com/eojthebrave/gatsby-drupal-examples/blob/dealing-with-images/src/components/Recipe/Recipe.js contain the failing code path.
Expected result
I would expect the
<Img .../>
component output in Recipe.js to display an image.Actual result
White screen, and console shows
TypeError: props.image.localFile is null
Environment
Let me know if there's any additional information I can provide or steps I can take to help trouble shoot this issue.
The text was updated successfully, but these errors were encountered: