Skip to content
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

Missing Images using Gatsby StaticImage #1

Open
yumyo opened this issue Apr 22, 2021 · 3 comments
Open

Missing Images using Gatsby StaticImage #1

yumyo opened this issue Apr 22, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@yumyo
Copy link

yumyo commented Apr 22, 2021

Hi,
Thank you for your work on this plugin!
When using StatciImage from gatsby-plugin-image, I can just see a black area when an image is supposed to appear. Is there any workaround or config option that might help with the issue?

Node v14.16.1
Gatsby CLI version: 2.19.2
Gatsby version: 3.3.1
NPM 6.14.13

@jamescoq jamescoq reopened this Apr 22, 2021
@jamescoq
Copy link
Contributor

hi @yumyo,
thank you for trying gatsby-plugin-pdf.

To be honest I haven't tested the plugin with new gastby-plugin-image yet. However what comes to my mind is that the images displayed by gastby-plugin-image are lazy loaded by default. Try to set loading property to value "eager" on your component.
I know that is not a good solution as you probably need your images to be lazy loaded, but it can at least point us in the right direction to make a fix :)

@jamescoq jamescoq added the enhancement New feature or request label Apr 22, 2021
@yumyo
Copy link
Author

yumyo commented Apr 22, 2021

Hi @jamescoq thank you for looking into this.
I have been digging a bit and it might be related to calling await page.emulateMedia('screen'); puppeteer/puppeteer#436 (comment) as puppeteer default to print
Another option to look at might be {waitUntil: 'networkidle'}

@yumyo
Copy link
Author

yumyo commented Apr 22, 2021

Unfortunately setting loading to 'eager' does not help. I have also tried different ways, a bare image component and a simple but no luck so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants