Open KnutSv opened 7 years ago
Hi ! I think it's related to https://github.com/akoenig/gulp-svg2png/issues/30#issuecomment-252615636
Is there a new gulp plugin for this ? I didn't find any walkaround yet.
My current workaround is to use svg-scaler for the scaling part.
var svg2png = require('gulp-svg2png');
var svgmin = require('gulp-svgmin');
var svgscaler = require('svg-scaler');
...
.pipe(svgmin([{removeViewBox: true}]))
.pipe(svgscaler({ noSvgo: true, scale: 2 }))
.pipe(svg2png())
...
This unfortunately doesn't work with svgs with outline strokes (it works, but it doesn't scale the stroke). So currently I'm using two svg-folders for each project, one with original svgs with outline strokes that i can easily modify when needed, and one where the outlines has been expanded so that the svgs can be converted correctly to pngs.
I've been using scaling
svg2png(2)
to create retina PNGs, but it no longer seems to be working since I updated to Mac OS Sierra.Tried saving SVG from Illustrator and Sketch and with different SVG-versions (only presentational attributes renders anything).