Skip to main content

Awesome Images

Avinash Rijal
1 min read
Updated Dec 29, 2025

Fix for gatsby-plugin-mdx and gatsby-remark-images

Awesome Images

Netlify CMS Media Configuration

First, in your static/admin/config.yml, make sure you have the following:

media_folder: content/assets
public_folder: ../assets

Docs: https://www.netlifycms.org/docs/configuration-options/#media-and-public-folders.

Gatsby Plugins

From @cwgw:

So digging a little deeper, it looks like Gatsby only looks for “subplugins” at one specific path, options.plugins.

gatsby-plugin-mdx uses options.gatsbyRemarkPlugins. This is fine for transforming markdown as the plugin handles that itself, but Gatsby-specific api files like gatsby-browser.js don’t get loaded because Gatsby doesn’t know they exist.

If you try this…

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

…everything works as it should.

Related Posts

I should have known about fnm before

I should have known about fnm before

Okay, I have just woken up and had my food. I opened my computer and as usual; started terminal. I just setup my arch hyprland yesterday night and trimmed everything down to only things that I need. …

4 min
From Gatsby to Hugo: Why I Finally Let Go

From Gatsby to Hugo: Why I Finally Let Go

Pretext Around 5–6 years ago, I stumbled upon GatsbyJS while searching for a JavaScript framework that could actually handle everything my personal blog needed: Markdown content Image optimization …

3 min
Hello to the new guitar

Hello to the new guitar

So, I brought my guitar today. It is Enya EA-X1 Pro. The guitar is 41’’ variant. There is solid spruce top which is dried for 10 years. Side is made up of Rosewood, Neck from Mahogany, …

1 min