birkir / gatsby-source-prismic-graphql

Gatsby source plugin for Prismic GraphQL
MIT License
137 stars 75 forks source link

Blank homepage when using gatsby image. #173

Open jodiedoubleday opened 4 years ago

jodiedoubleday commented 4 years ago

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 commented 4 years ago

Is anyone else experiencing this issue?

jodiedoubleday commented 4 years ago

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 removeauto=format on images that use imageSharp?

Could this be the reason for white screening?