I using svgo as gulp-imagemin plugin and task where i want to minify my svg images and use removeAttrs plugin, but i have no result.
gulp.task('minify', function() {
gulp.src('*.svg')
.pipe(imagemin([
imagemin.svgo({plugins: [
{ removeAttrs: { attrs: 'filter' } }
]})
]))
.pipe(gulp.dest('.'));
});
This code does not work, images minifying but with no removing filter attribute. By the way i want to know how to remove multiple attributes and is there way to remove whole tags?
This is how I'm removing fill attribute from svg
plugins: [
{removeAttrs: {attrs:['fill']}}
]
Most helpful comment
This is how I'm removing fill attribute from svg