loading...

MDX Images

johntelford profile image JohnTelford ・1 min read

I'm having a problem with MDX images. Using the markdown syntax ![]() doesn't seem to work. How do I include images in MDX files?

Discussion

pic
Editor guide
Collapse
ankursheel profile image
Ankur Sheel

In your gatsby-config.js try adding this to the mdx options

 gatsbyRemarkPlugins: [
        {
            resolve: 'gatsby-remark-images',
            options: {
                maxWidth: 590,
                linkImagesToOriginal: false,
                withWebp: true,
            },
        },
    ],