gatsby-source-prismic-graphql icon indicating copy to clipboard operation
gatsby-source-prismic-graphql copied to clipboard

Blank homepage when using gatsby image.

Open jodiedoubleday opened this issue 4 years ago • 2 comments

When I run gatsby develop I get a blank page, after visiting other links on my site, then going back to the homepage I get the following error...

TypeError: Cannot read property 'getElementsByTagName' of null Screenshot 2020-03-30 at 18 05 43

this only happens on the homepage and when I use gatsby-image/imageSharp. I'm using it as per the docs (checking if gatsby sharp node exists, if not serving the normal image) but I'm still getting the issue.

Repo can be found here if it is of any help - https://github.com/the-juniper-studio/thejuniperstudio

jodiedoubleday avatar Mar 30 '20 17:03 jodiedoubleday

Is anyone else experiencing this issue?

jodiedoubleday avatar Apr 07 '20 10:04 jodiedoubleday

I've looked into this and had a few thoughts. I believe this is because Prismic is now using IMGIX. Therefore it is sending to this plugin ?auto=format which means this plugin is now getting a WEBP. I think Gastby Image only works on JPG and PNG formats.

We need to maybe adjust this plugin to remove auto=format on images that use imageSharp?

Could this be the reason for white screening?

jodiedoubleday avatar Apr 14 '20 13:04 jodiedoubleday