I’m trying to set up an image component using Imgix which works great for URLs sourced from other locations, like Shopify for example.
However with Gatsby, I have a bunch of images that are static and local to the project, so the only URL I’ve been able to output is a relative one.
My goal is to detect when the build/deploy has happened through Netlify in production, and append the relative URLs I have access to in this way:
Which would result in an image URL that Imgix can pick up, like this.
Ideally I’d like this to happen only in production and specific to the hashed deploy URL.
But I’m pretty stuck on how to pass Netlify read-only variables into Gatsby.