danielmahon/gatsby-remark-relative-images

After migrate to 0.3.0, images doesn't work

felipefialho opened this issue · 7 comments

Hi,

In last week I've updated the dependency for 0.2.3 to 0.3.0 and images didn't work more.

I can't understand what is the cause of problem, but I think that gatsby-remark-relative-images doesn't resolve the paths anymore.

For example (in prod), in 0.3.0:

<img src="assets/2019-11-27-github-explore.png" alt="Github Explore">

In 0.2.3 working well.

@felipefialho I am looking into this today and testing with latest https://github.com/netlify-templates/gatsby-starter-netlify-cms starter

@felipefialho do you have your assets folder defined in gatsby-config.js? see my comment in #29 also

    {
      resolve: 'gatsby-source-filesystem',
      options: {
        path: `${__dirname}/src/assets`,
        name: 'assets',
      },
    },

with the src/assets folder defined in gatsby-config.js the following works

src/pages/blog/blog-post-1.md

frontmatter
---
![coffee](../../assets/coffee.png)
<img src="../../assets/coffee.png" alt="Coffee" />

@danielmahon Yes, I have.

You can check my source here, 😄

I am also seeing an odd relative image resolving issue with 0.3.0. Going back to 0.2.2 makes it work again.

This works with both 0.2.2 and 0.3.0.
image

This works with 0.2.2 and does NOT work with 0.3.0:
image

If you think this should be a separate issue. Please let me know.

I also have an independent case where downgrading from 0.3.0 to 0.2.3 is the solution and both all relevant config (gatsby-config.js and static.admin/config.yml) and the markdown files themselves remain unchanged.

On 0.3.0, images referenced within the body of markdown files are rendered out using the parent asset in a simple tag.
23-08-krq8q-qlymv

On 0.2.3, images images from within the body of markdown files are rendered in a proper gatsby-image-like wrapper.
23-03-wf2n1-blfli

Having this same issue when using 0.3.0

For now it works again. I've been using "gatsby-remark-images": "^3.3.8".

@Samic8 You can check here.