DEV Community

JohnTelford
JohnTelford

Posted on

MDX Images

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?

Top comments (1)

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,
            },
        },
    ],