Skip to content

Inline base64 data for SVG? #425

Answered by yhatt
karlll asked this question in Q&A
Apr 1, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Marp is using markdown-it as a Markdown parser, and unfortunately markdown-it does not have a support for SVG data image URI. And the author of markdown-it is opposed to changing this restriction.

If you want to render SVG data URI image in Marp, you have to use a raw <img> tag with enabling HTML, or use a plugin to allow SVG data URI as a recognizable URL (only in Marp CLI).

// engine.js for Marp CLI
module.exports = ({ marp }) => marp.use((md) => {
  // https://github.com/markdown-it/markdown-it/issues/447#issuecomment-373408654
  const defaultValidateLink

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@karlll
Comment options

Answer selected by karlll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants