Support SVG
Closed this issue · 0 comments
nicoburns commented
We should support SVG images. SVG can be embedded in web content in two main ways:
- As an image using an
<img>
tag (<img src="url/to/file.svg" />
) - Inline using an
<svg>
tag.
The <img>
case is easier to support so we should probably start with that.
Possible implementation strategies:
- Render SVGs into raster images with resvg. This will give very high quality results so long as they're not animated, and should be easy to do, but does probably come with a binary size penalty.
- Render SVGs with vello_svg. This is a much less mature implementation, but potentially makes better use of our existing rendering stack, and would deal with animated SVGs better.