2

I'm trying to implement inline images with mdx files.

But I can't make it happen, no image is loaded.

After a bit of reading some solutions here, they suggest to add gatsby-remark-images also in the plugins array in options.plugins as in

`gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    `gatsby-remark-images`,
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        gatsbyRemarkPlugins: [
          {
            resolve: `gatsby-remark-images`,
          },
        ],
        plugins: [`gatsby-remark-images`],
      },
    },

in my mdx file ![test image]('./myFirstPost/images/colorcloud.jpg')

It didn't work for me though. Anybody can help me with some guidance ?

Cheers

vldmrrdjcc
  • 2,082
  • 5
  • 22
  • 41
Andrea
  • 351
  • 1
  • 3
  • 9
  • seems like the latest version of gatsby-plugin-mdx doesn't allow plugins in that field, I got this error: `Invalid plugin options for "gatsby-plugin-mdx": - "plugins" must contain 0 items` – Segfault Sep 16 '22 at 15:01

1 Answers1

0

Yes turned out after spending half a morning on the matter that there's no needs of quotes in the md link to the img

Andrea
  • 351
  • 1
  • 3
  • 9