You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have attempted to build a number of components using gatsby-plugin-image, but am running into an issue where images not currently part of the vDOM are not being pre-rendered, despite the component receiving a loading="eager" prop (I have tried hard-coding this value). The images therefore do not initially appear and once downloaded they pop in after a potentially large delay on slow connections.
The components include:
Image Crossfade
Conditionally renders images based on boolean state value.
Image Slider
Full width slider which displays a block of text alongside an image.
I have built an image provider to query for images in the components. Here it is:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have attempted to build a number of components using gatsby-plugin-image, but am running into an issue where images not currently part of the vDOM are not being pre-rendered, despite the component receiving a loading="eager" prop (I have tried hard-coding this value). The images therefore do not initially appear and once downloaded they pop in after a potentially large delay on slow connections.
The components include:
Image Crossfade
Image Slider
I have built an image provider to query for images in the components. Here it is:
Here is the image slider:
Is it possible to pre-render images which are not part of the vDOM? If so, does anybody have any suggestions for what I may be missing here?
Edit: Does anybody know of any way to force a pre-load of an image served via a GatsbyImage component, aside from the loading="eager" prop?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions