I created a blog with the tutorial on gatsbyjs.org. However, I am unable to reference to images in my markdown - I did some googling and no obvious solution exists.
Here's my current folder structure:
โโโ layouts
โย ย โโโ index.js
โโโ pages
โย ย โโโ 404.js
โย ย โโโ art.js
โย ย โโโ contact.js
โย ย โโโ index.js
โย ย โโโ my-files.js
โย ย โโโ static
โย ย โย ย โโโ some-image.jpg
โย ย โโโ work.js
โโโ posts
โย ย โโโ 2016-04-04-some-post.md
โโโ templates
โย ย โโโ blog-post.js
โโโ utils
โโโ typography.js
TLDR: how do I reference some-image.jpg
from the single post written in markdown?
Maybe looking at Mathews' blog can help?
Thanks, I was able to solve this (a bug due to migration)
@thevangelist It is always, good practice to describe what went wrong, how you found out, and how you resolved it. Just in case somebody else has a bug at the same point and comes here looking.
;) Came here looking.
I think this is what @thevangelist was referring to: https://github.com/gatsbyjs/gatsby-starter-blog/issues/113#issuecomment-408619291
After Migrating to v2 there was a breaking change which was patched by gatsby@^2.0.0-beta.61
and gatsby-transformer-remark@^2.1.1-beta.5
.
In my case, I also still needed to install gatsby-remark-images and its dependency, gatsby-plugin-sharp. Hope this helps anyone else who comes looking!
For anyone that finds this post lacking,
Assuming you have a folder structure like:
โโโ pages
โ โโโ post-title
โ โ โโโ index.md
โโโ โโโ โโโ image.jpg
You can reference the image from inside the post like so:
![](./image.jpg)
Make sure you've got gatsby-transformer-remark and gatsby-remark-images installed and configured.
Most helpful comment
For anyone that finds this post lacking,
Assuming you have a folder structure like:
You can reference the image from inside the post like so:
Make sure you've got gatsby-transformer-remark and gatsby-remark-images installed and configured.