-
Notifications
You must be signed in to change notification settings - Fork 184
Add support fo Gatsby-image #8
Comments
+1 |
+2 |
+3 |
I run into the same problem. But there is a merged pull request #10 which should solve this issue (i think it provids access to the base64 string of the image, but not sure). @pierreburgy do you want to make 0.0.4 Release and deploy a new NPM package? 👍 |
Can anybody explain how this is working right now? I am struggling with missing images (obviously) when trying to build my strapi-gatsby project. |
@dwehrmann I used the master branch of this project (not the NPM package since it is 0.0.3). Before I start, here a bit of context: I have a Strapi API called "Category" which has a Title (String) and a Thumbnail (Media Type). The Strapi Source Plugin copies the media types into the You don't need to care about the location since you can query the URL through GraphQL. Here an example query {
allStrapiCategory {
edges {
node {
thumbnail {
publicURL
}
}
}
}
}
Hope that helps :) |
@gonzochic I'm using a similar configuration as yours. I moved from strapi to netlify because of the image support. Have a look at how I'm able to query using the script below, and readjust to your needs.
I guess replace MarkdownRemark with StrapiCategory and /img with /.cache.
|
@gonzochic @kmorf Thank you guys, that looks promising! |
@dwehrmann fell into the same trap. Thats why I asked @pierreburgy if it is possible to deploy a new package. Maybe another contributer can? @kmorf: cool. thanks for the kickstart! I'll try it out 👍 |
@gonzochic Thanks for your help! Are there any changes done to how the queries are made? Trying to follow your advice, I removed the npm gatsby-source-strapi package and re-installed it via Now Obviously this part in my gatsby-node.js does not work anymore:
"Referenz" is my API. It works with the gatsby-source-strapi version on npm and I cannot see why it should not work with the version from #10 Edit: I just looked into the contents of the installed node_module and I guess that was not the correct way of using the current master branch ... |
hey guys, here's how am using the github repo to use the latest updates
hope this helps |
Amazing, that worked! Thank you, @rezof and @gonzochic ! Now I know what package managers are for. Let's hope that this gets deployed in the npm package asap @pierreburgy @lauriejim |
hey guys, I have downloaded gatsby-source-strapi plugin from this github master and created a local plugin folder yet i cannot query publicURL as suggested @gonzochic
or query childImageSharp
GraphQL Error Unknown field my configuration is as such
|
my image field has allow multiple files checked so it didnt work, after removing that option it works as described. So basically this feature only works with single image field. Is this intended or a bug? Update: I got it to work with multiple images by following gatsby-source-wordpress example but I have to write more code and it's really rough right now. I have to delete .cache file when it throws internal error node.internal.type === 'StrapiProducts' just checks my type Please tell me if the library has a way to work with multiple image field, I'd love to use that instead but for now I guess this will do path: gatsby-node.js
|
Related to gatsbyjs/gatsby#5519
The text was updated successfully, but these errors were encountered: