Closed dylanjha closed 4 years ago
You can use imageUrlBuilder({projectId: 'abc123', dataset: 'someDataset'})
if you know the project ID and dataset up front.
I suppose you could also extract the project ID and dataset from an asset by looking at the path
property and doing some parsing, but that only works if the asset is the document and won't work if it's a reference
sweet, thank you!
When using gatsby-source-sanity, I don't typically have access to a sanityClient directly, but I do have access to a sanity image
asset
object via the graphql api that the gatsby-source-sanity exposes.The builder in this example requires a configured sanity client, is there a way to get the convenience of using the builder methods, by passing in a raw sanity asset that was obtained in a gatsby build?