gatsby-remark-images, you first need to install the relevant
If you don’t have
gatsby-source-filesystem installed, also install that.
Then configure the plugins.
gatsby-source-filesystem needs to be
pointed at wherever you have your images on disk,
needs to be both a sub-plugin of
gatsby-plugin-mdxand a string entry in
the plugins array, and
gatsby-plugin-sharp can be included on its own.
Then, any image in your MDX file will be automatically handled by Gatsby image processing.
By default, the text
my image will be used as the alt attribute of the
img tag. If an empty alt attribute like
alt="" is wished,
a reserved keyword
GATSBY_EMPTY_ALT can be used.
You can use remark plugins directly if there are transformations you’d like to make on your MDX documents. This can do anything from adding emoji support to enforcing a particular title capitalization format.