Closed xerc closed 7 months ago
& output into stdout
does not work as descr. @ https://github.com/axe312ger/sqip/#output
Yes, SVGO expects a svg to be input. If you pass an JPG, it does not know what to do with it. You first need to use a plugin that transforms pixels into vectors, like the pixelator plugin or the primitive plugin. Then you can use the svgo plugin to minimize the SVG data
yea ; but sqip -i input.jpg
is possible & therefore its a bit confusing
may consider primitive
as fallback if potrace
| pixels
are not used
yea ; but
sqip -i input.jpg
is possible & therefore its a bit confusing may considerprimitive
as fallback ifpotrace
|pixels
are not used
I see your point, but when you don't pass any plugins, it runs the default set of plugins.
We might make it more clear by outputting which plugins are used when running the command
SvgoParserError: :1:1: Non-whitespace before first tag. at sax.onerror (/usr/local/lib/node_modules/sqip-cli/node_modules/svgo/lib/parser.js:244:19) at emit (/usr/local/lib/node_modules/sqip-cli/node_modules/@trysound/sax/lib/sax.js:518:35) at error (/usr/local/lib/node_modules/sqip-cli/node_modules/@trysound/sax/lib/sax.js:549:5) at strictFail (/usr/local/lib/node_modules/sqip-cli/node_modules/@trysound/sax/lib/sax.js:573:7) at beginWhiteSpace (/usr/local/lib/node_modules/sqip-cli/node_modules/@trysound/sax/lib/sax.js:847:7) at SAXParser.write (/usr/local/lib/node_modules/sqip-cli/node_modules/@trysound/sax/lib/sax.js:902:11) at parseSvg (/usr/local/lib/node_modules/sqip-cli/node_modules/svgo/lib/parser.js:256:7) at optimize (/usr/local/lib/node_modules/sqip-cli/node_modules/svgo/lib/svgo.js:34:15) at Object.optimize (/usr/local/lib/node_modules/sqip-cli/node_modules/svgo/lib/svgo-node.js:97:10) at SVGOPlugin.apply (/usr/local/lib/node_modules/sqip-cli/node_modules/sqip-plugin-svgo/dist/sqip-plugin-svgo.js:25:31)