Fix svg.js functions to be async
Fix index.js to choose image types wisely