Skip to content

Instantly share code, notes, and snippets.

@galaxy001
Last active May 26, 2025 12:27
Show Gist options
  • Save galaxy001/15ff2e9a94a6607b2d65f0db2673fd81 to your computer and use it in GitHub Desktop.
Save galaxy001/15ff2e9a94a6607b2d65f0db2673fd81 to your computer and use it in GitHub Desktop.
test

This method doesn't require an internet connection…

  1. base64-encode the <svg> markup (eg. paste svg at base64encode.org)
  2. URL-encode the base64-encoded string (eg. paste base64 string at urlencoder.org)
  3. Put the resulting string in ![alt text](data:image/svg+xml,<paste_your_svg_string_here> "title")

The result would be a string similar to the following that can be inserted into a Jupyter Notebook Markdown cell…

svg image


1)png tester1
2)png tester2

1) the referenced base64 block stops being parsed right at the point where 'a new chunk of image' starts, the green part ... So4Z4wxkXa7KukmKul2dDvd ...
2) by passing the block directly we get the whole image

This was tested with http://tmpvar.com/markdown.html. I don't know how it behaves on github. The issue has been already well discussed.

@houzhongjian
Copy link

houzhongjian commented May 26, 2025

Check out the Base64 encoding and decoding tool I built: https://base64.best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment