⚛️📸 Gatsby source plugin to fetch ALL your instagram media from Instagram API + Gatsby Image support.
yarn add gatsby-source-instagram-all
- Add this configuration to your gatsby-config.js:
{
resolve: `gatsby-source-instagram-all`,
options: {
access_token: "YOUR_ACCESS_TOKEN"
}
}
👓 Watch this video if you're having trouble generating your access token.
Query data like this:
query myQuery {
allInstagramContent {
edges {
node {
caption
media_url
localImage {
childImageSharp {
fluid(maxHeight: 500, maxWidth: 500, quality: 90) {
...GatsbyImageSharpFluid_withWebp
}
}
}
}
}
}
}
Option | Type | Description |
---|---|---|
access_token | string | Your access token |
max_id | string (optional) | Option to return media earlier than, but not including, this max_id |
min_id | string (optional) | Option to return media later than, and including, this min_id |
- Fork it
- Create your feature branch
git checkout -b feature/fooBar
- Commit your changes
git commit -am 'Add some fooBar'
- Push to the branch
git push origin feature/fooBar
- Create a new Pull Request