gatsby-uc / gatsby-source-strapi

Gatsby source plugin for building websites using Strapi as a data source
MIT License
354 stars 182 forks source link

Problem loading images from Strapi #306

Closed SilasN15 closed 2 years ago

SilasN15 commented 2 years ago

Hello, I've been using Gatsby and Strapi for a while now and wanted to query pictures from Strapi in Gatsby. I have previously used the Strapi REST-API and was able to get the URL of the images without problems when I set the populate parameter. I tried the same thing when configuring gatsby-source-strapi. I tried both * and images however it didn't work and I'm not sure if the error is mine. When I try to query the image in the graphql editor I get an error. I am very grateful for your plugin it works great. I hope the error can be cleared up 😊

Here is my gatsby-config.js: https://gist.github.com/SilasN15/9deb87e9dcde6b2f977dbb74fbe6c391

remidej commented 2 years ago

If you need to add the populate param, it looks like you're using Strapi v4. If that's the case, you should use v2.x.x of gatsby-source-strapi (current latest is beta.0).

Please let me know if that solves your issue