You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I love this gem, how am I just discovering it?!? Especially appreciate the separate pack gem. Great stuff. Thanks for all your hard work creating and maintaining.
When I compress SVGs I always use -p1, which has a tremendous impact on file size. SVG tools always export with tons of extra sigfigs, which svgo can easily remove. Using one of my recent SVG files:
original - 4.5k
after svgo - 3.3k
after svgo -p1 - 2.1k
I've used the precision flag for years on hundreds of SVGs, never noticed a visual difference. It's technically lossy, though.
Can we add support for this? Either --svgo-allow-lossy or --svgo-precision? Happy to try a PR if that would be helpful.
The text was updated successfully, but these errors were encountered:
From what I understand visibility of reducing number of fractional digits will highly depend on svg, from no difference to significant, so it is definitely a lossy option. It can work as similar option for pngquant, jpegoptim or jpegrecompress - if allow_lossy is on, then precision can be specified. Glancing over svgo code, I'd go with default precision to be 3. PR will be very welcome
I love this gem, how am I just discovering it?!? Especially appreciate the separate pack gem. Great stuff. Thanks for all your hard work creating and maintaining.
When I compress SVGs I always use -p1, which has a tremendous impact on file size. SVG tools always export with tons of extra sigfigs, which svgo can easily remove. Using one of my recent SVG files:
original - 4.5k
after svgo - 3.3k
after svgo -p1 - 2.1k
I've used the precision flag for years on hundreds of SVGs, never noticed a visual difference. It's technically lossy, though.
Can we add support for this? Either
--svgo-allow-lossy
or--svgo-precision
? Happy to try a PR if that would be helpful.The text was updated successfully, but these errors were encountered: