gatsby – GatsbyImage sourcing from nested GraphQL field
I’m sourcing data from Directus. There is a field called image_ext
which contains a link to external resource. I’d like Gatsby to download all images we render and process them so that they are optimized and served locally.
The query looks like this
query Articles {
directus {
articles {
image_ext
}
}
}
All of the guides I found don’t mention how to handle some deeply nested field which is not part of some node that you create.
I cannot use regular img
tag because some of the resources are internal and inaccessible from public.
Read more here: Source link