util.imageToDataUri(url, callback)

Convert an image at url to the Data URI scheme. This function is able to handle PNG, JPG and SVG formats. The callback function has the following signature function(err, dataUri) {}. Useful if you want to embed images right into your diagrams instead of having them referenced externally.