Export to SVG or PNG

In that case you will need to customize the Diagram.makeSvg function by using its elementFinished option: Diagram | GoJS API

I think you’ll want your elementFinished function, when the element was for a Picture, modifies the resulting SVG element by inserting the contents of the SVG file.