Closed CharlyMartin closed 5 years ago
In the gatsby-source-airtable
repo, there are examples that may help clear things up for you. Feel free to open up an issue there with further questions / suggestions on how we may improve documentation to help prevent others from getting tripped up on this.
(Going to close this as it's not maintained in this repo. Again, happy to answer any questions in the repo.)
Thanks @jbolda for the answer.
I found a workaround, not using the gatsby-image
plugin, to meet a deadline but I will have a look at the examples in the repo and open an issue if I find clarifications to add 🙂
@CharlyMartin could you share your solution?
Hi @remi2j,
I am just using gatsby-source-airtable
to query the data on Airtable, using GraphQL.
The image is not processed by gatsby-image
and sharp
. It's "just" an API call where I get back the raw image's url, that I can then inject in the HTML.
The query looks like this:
allAirtable(filter: {table: {eq: "home_page"}, data: {language: {eq: "${lang}"}}}) {
edges {
node {
data {
brand
caption
button
referrals
google
testimonials
pictures {
url
}
concept
alert
alert_message
language
}
}
Here's my repo if you want to have a look: https://github.com/CharlyMartin/hubsy-v2.3
I hope it helps 🙂
Seeing as this issue comes up very easily searching for a solution on Google, I thought I would post an answer here.
You can use gatsby-plugin-remote-images to expose absolute image URL's to gatsby-image so they will be processed as if they are stored locally. Enjoy!
To be clear, this is built into the gatsby-source-airtable
plugin. If you are using that plugin, the documentation explains how to set this up that they are downloaded and fed into gatsby-image
.
Summary
I can't query images coming from Airtable using gatsby-image.
Description
I would add use
gatsby-image
to query images coming from Airtable (gatsby-source-airtable), but reading the documentation it seems like it's only possible to do so with local images.Is this possible at all? Thanks for your help 😃
Environment
File contents (if changed)
gatsby-config.js
: