Replies: 1 comment
-
Welcome @riefer02!
The post author may be able to offer more in depth commentary on how to leverage or adapt the pattern they suggest.
Stepping away from the Gatsby specifics. import Component from "./page/example.mdx" That returned component can be passed props, same as any other. <Component any="prop" can="go" here /> So wherever and however you get the MDX component back as a React component, that is where you can inject any props and components you want. Taking a best guess at the Gatsby side, likely it is possible through their abstractions:
|
Beta Was this translation helpful? Give feedback.
-
Howdy MDX team and friends
I followed this gatsby doc page (https://www.gatsbyjs.com/blog/mdx-embedded-gatsby-image/) to be able to pull in remote images and process them through the gatsby image plugin.
My organization recently updated to @mdx-js/mdx at v2.3.0 The MDXRenderer is no longer required and that is how I was passing images into the mdx (you can see examples of this in the documentation link I posted above).
Since the MDXRenderer is no longer required anyway and has been replaced with children is there anyway to pass props in the markdown page?
In my .mdx file.
I hope my explanation was clear, let me know if I can provide any more details.
TL;DR - updated mdx to v2, image optimization process with gatsby image from docs not working. What is the workaround or new approach for optimizing remote images into latest version of @mdx-js/mdx?
Beta Was this translation helpful? Give feedback.
All reactions