Closed ghost closed 4 years ago
As suggested in other related issues to update the remote repo then it will solve the problem but I got the same build error on Netlify as well. Here is graphql screenshot: https://prnt.sc/sc328l I am using Netlify CMS and there is no option to create a new page so I am creating markdown pages locally but due to this I am facing this image issues. How can I solve this problem? how should I fetch a string image path in graphql query If it doesn't recognise it as an image field. please guide.
I removed this code from all pages for which I get an error and updated my repo again and it builds successfully. But now there are no banner images. How should I update them if I do from Netlify CMS then local repo is not updated and again if I add this code it will give me error. What is the best way to avoid this image related error.
image {
childImageSharp {
fluid(maxWidth: 2048, quality: 100) {
...GatsbyImageSharpFluid
}
}
}
Hi @buxzee !
Sorry to hear you are running into an issue. This line may be problematic as it is not a relative path, so the image
field may not be recognized as a file:
image: /img/e-book.jpg
Try using a relative path instead. Also, please check out this section in docs on how to set up images in markdown.
If this doesn't help - it is incredibly helpful if you're able to create a minimal reproduction. This is a simplified example of the issue that makes it clear and obvious what the issue is and how we can begin to debug it.
If you're up for it, we'd very much appreciate if you could provide a minimal reproduction and we'll be able to take another look.
Thanks for using Gatsby! 💜
Closing due to no reproduction or response in several weeks.
My site was running perfectly. When I add a new markdown file and an associated template file. Then I add an image inside markdown file my site got broken and I run gatsby clean and gatsby develop then It says fail to compile below is the screenshot. This message I had got earlier as well when I add some image to markdown file and then I had to restart the project by cloning my repo again. But every time why it happens, what's wrong. I would really appreciate if anyone can resolve this issue.
https://prnt.sc/sc059l
Environment (if relevant)
File contents (if changed) No files changed
gatsby-config.js
: N/Apackage.json
: N/Agatsby-node.js
: N/Agatsby-browser.js
: N/Agatsby-ssr.js
: N/AMarkdown File
Template file
config.yml defining collection