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 am using gatsby-transformer-json to get a list of all Json files and I can query their fields successfully.
The issue is I can't manage to access the co-located images easily.
I was hoping, from each returned Json node, to be able to query its parent Directory, then find inside nodes of image sharp, but none is returned.
To access the images in a component I have instead to do a static query for all image like the following, which are thousands, save them into a hook, then filter by parent directory. The query for all images is very slow and I am possibly running out of memory with Error: write EPIPE possibly for the same reason.
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My content structure looks like this:
I am using
gatsby-transformer-jsonto get a list of all Json files and I can query their fields successfully.The issue is I can't manage to access the co-located images easily.
I was hoping, from each returned Json node, to be able to query its parent Directory, then find inside nodes of image sharp, but none is returned.
To access the images in a component I have instead to do a static query for all image like the following, which are thousands, save them into a hook, then filter by parent directory. The query for all images is very slow and I am possibly running out of memory with
Error: write EPIPEpossibly for the same reason.Ideally I would love to be able to do something like
Beta Was this translation helpful? Give feedback.
All reactions