Selaa lähdekoodia

Avoid destroying SVG fonts when optimizing images

Gaël Métais 10 vuotta sitten
vanhempi
commit
6bd55e4807
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      lib/tools/weightChecker/imageOptimizer.js

+ 1 - 1
lib/tools/weightChecker/imageOptimizer.js

@@ -200,7 +200,7 @@ var ImageOptimizer = function() {
         } else if (type === 'png' && !lossy) {
             engine = Imagemin.optipng({optimizationLevel: OPTIPNG_COMPRESSION_LEVEL});
         } else if (type === 'svg' && !lossy) {
-            engine = Imagemin.svgo();
+            engine = Imagemin.svgo({ plugins: [ { removeUselessDefs: false } ] });
         } else {
             deferred.reject('No optimization engine found for imagemin');
         }