Is it possible to export SVG files having embedded WebP images?
My tests resulted in plain white output images whereas SVG files with embedded JPEG or PNG images work just fine.
Example SVG with embedded WebP image:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1280 720" width="1280" height="720">
<image href="https://www.gstatic.com/webp/gallery/2.webp" width="1280" height="720" />
</svg>
Example SVG with embedded JPEG image:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 1280 720" width="1280" height="720">
<image xlink:href="https://www.gstatic.com/webp/gallery/2.jpg" width="1280" height="720" />
</svg>
For export:
var fileStream = new StreamReader($"input.svg").BaseStream;
using SvgImage image = (SvgImage)Image.Load(fileStream);
using FileStream fs = new FileStream("output.webp", FileMode.Create, FileAccess.ReadWrite);
image.Save(fs, new WebPOptions());
Thank you.