1

With the Frontmatter markdown compiler, it is possible to refer to completely custom components in the markdown, and then supply the component to render it in the .tsx

But what I am trying to do is render all img tags in a custom way.

Specifically, I just want to update the source, so ![](/assets/images/tux.png) is rendered as <img src="https://cdn.net/assets/images/tux.png" />. If anyone knows how to do that specifically, I’ll take it.

Right now, I am looping through the HTML nodes manually after rendering, finding the image tags, and updating the source, which besides being ugly hack, puts a 404 in the log, as the original, bad URL is fetched first.

Michael Lorton
  • 43,060
  • 26
  • 103
  • 144

0 Answers0