Using the LEADTOOLS SDK you could complete the task of embedding the images into the SVG file. I would recommend checking out the LEADTOOLS SDK below is a complete code snippet for generating an SVG document by embedding a RasterImage into a basic SVG document using a data URI in a .NET C# implementation. As a disclaimer I do work for this vender which is a paid for library.
https://www.leadtools.com/support/forum/posts/t12616-
public static void EmbedInSvg(RasterImage image, string outputFile)
{
// Generate the header information
var sb = new StringBuilder();
sb.AppendLine("<?xml version=\"1.0\" standalone=\"no\"?>");
sb.AppendLine(
"<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\" " +
"\"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">"
);
sb.AppendLine(string.Format(
"<svg width=\"{0}px\" height=\"{1}px\" version=\"1.1\" " +
"xmlns=\"http://www.w3.org/2000/svg\" " +
"xmlns:xlink=\"http://www.w3.org/1999/xlink\">",
image.Width, image.Height
));
// Convert to a base64 data URI
string dataURI;
using (var codecs = new RasterCodecs())
using (var ms = new MemoryStream())
{
// SVG only required to support JPEG and PNG (or other SVG)
RasterImageFormat format;
switch (image.OriginalFormat)
{
case RasterImageFormat.Jpeg:
case RasterImageFormat.Jpeg411:
case RasterImageFormat.Jpeg422:
case RasterImageFormat.JpegCmyk:
case RasterImageFormat.JpegCmyk411:
case RasterImageFormat.JpegCmyk422:
case RasterImageFormat.JpegLab:
case RasterImageFormat.JpegLab411:
case RasterImageFormat.JpegLab422:
case RasterImageFormat.JpegRgb:
format = image.OriginalFormat;
break;
case RasterImageFormat.Png:
default:
format = RasterImageFormat.Png;
break;
}
codecs.Save(image, ms, format, 0);
dataURI = string.Format(
"data:{0};base64,{1}",
RasterCodecs.GetMimeType(format),
Convert.ToBase64String(ms.ToArray())
);
}
// Insert the image tag
sb.AppendLine(string.Format(
"\t<image x=\"0\" y=\"0\" width=\"{0}px\" " +
"height=\"{1}px\" xlink:href=\"{2}\" />",
image.Width, image.Height, dataURI
));
// Finish the file
sb.AppendLine("</svg>");
// Save
File.WriteAllText(outputFile, sb.ToString());
}