Markdown SVG upgrades
Blog · Watch/Read
- Simon Willison’s
markdown-svg-renderertool has been upgraded to provide an ideal solution for sharing Markdown documents that include SVG, especially animated ones, by offering versatile rendering and export capabilities. - The tool renders SVG blocks within Markdown and includes “tabs” for converting them: PNG and JPEG for static images, and a new MP4 tab for animated SVGs.
- The MP4 conversion feature detects SVG animations, estimates loop duration, renders frames, and then uses
ffmpeg.wasm(a 30+MB WebAssembly build of FFMPEG) to compile these frames into an MP4 video directly in the browser. - This enables users to easily share animated SVG content on platforms that lack native SVG or animated SVG support by converting it into widely compatible formats like PNG, JPEG, and MP4.