Skip to content

Latest commit

 

History

History
43 lines (27 loc) · 1 KB

README.md

File metadata and controls

43 lines (27 loc) · 1 KB

npm PRs Welcome Open Source Love License

📸 Cute SVG

Image optimizer by converting to SVG. Demo

Install

yarn add cute-svg

Usage

const cute = require('cute-svg')
const fs = require('fs')

const inputFile = __dirname + '/sample.jpg'
const outputFile = __dirname + '/output.json'

cute({ filePath: inputFile })
  .then(svg => fs.writeFileSync(outputFile, svg))
  .catch(e => console.log(e))

// OUTPUT
// { tracedSvg: String, aspectRatio: Number }

Example

From this:

133kb

notcute

To this:

36kb

cute