Skip to content

Commit

Permalink
Don't remove IDs from SVGs when optimizing
Browse files Browse the repository at this point in the history
IDs are often used for styling and embedding SVGs (via `<use>`, Snap.svg
etc.)
  • Loading branch information
silvenon committed Feb 12, 2015
1 parent 46119ec commit 3860266
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ gulp.task('images', function () {
return gulp.src('app/images/**/*')
.pipe($.cache($.imagemin({
progressive: true,
interlaced: true
interlaced: true,
// don't remove IDs from SVGs, they are often used
// as hooks for embedding and styling
svgoPlugins: [{cleanupIDs: false}]
})))
.pipe(gulp.dest('dist/images'));
});
Expand Down

0 comments on commit 3860266

Please sign in to comment.