This project supports both a raster image in SVG and SVG in a raster image (png / jpeg / gif / etc), offers flexible settings, various visualization tools, JavaScript API for node.js and a browser, and a command line.
When properly configured, it gives good results and a small SVG size. If you just want to transform logos / drawings, then no settings are needed, but if photos / realistic drawings, then you need to play with the settings until you are satisfied with the size / quality ratio.
https://www.npmjs.com/package/svg-png-converter
He has a playground, although now I'm working on the best one, as more functions have been added:
https://cancerberosgx.imtqy.com/demos/svg-png-converter/playground/#
cancerbero
source share