This sample shows how to setup an elementFinished option for Diagram.makeSVG that will replace the SVG <image> tag's href with a Base64 URI instead of pointing to the Picture.source. This can be useful to reduce external dependencies within your exported SVG.

This method will only work if you assets are at the same origin, or otherwise not blocked by a cross-origin request policy.

加入 GoJS 交流群
GoJS 交流群 (769862113)