Remark Image

Convert images into static imports

Usage

Convert images into imports (MDX only).

import { remarkImage } from 'fumadocs-core/mdx-plugins';

export default {
  remarkPlugins: [remarkImage],
};

For example, from this MDX document.

![Hello](./hello.png)

Yields:

import HelloImage from './hello.png';

<img alt="Hello" src={HelloImage} />

You need an image loader to handle image imports.

Last updated on