From 899ceac132f6f5c5e712cc88ae6b42cdda9a2614 Mon Sep 17 00:00:00 2001 From: Michael Van Der Velden Date: Tue, 15 Jan 2019 09:03:38 +0000 Subject: [PATCH] Decrease optipng level (#2143) After seeing the following graph [here](http://sweetme.at/2013/09/11/how-to-maximize-png-image-compression-with-optipng/) we decided to test optimsation level 2 for OptiPNG instead of 7. This is because, acording to the graph we would notice no real difference in avarage file size but would notice a speed increase with our builds. ![image](https://user-images.githubusercontent.com/9092863/50760280-39a7c480-125f-11e9-9bd6-d28171289abe.png) After testing , we noticed our theme build go from a build time of over 10 mins (just on the 94% asset optimisation step) to an avarage of `150.75s`. All the while, we only gained 10-15kb per png file which we believe more than reasonable for a build speed increase of this magnatude. --- resources/assets/build/webpack.config.optimize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/build/webpack.config.optimize.js b/resources/assets/build/webpack.config.optimize.js index 22fc5717c5..bec075c626 100644 --- a/resources/assets/build/webpack.config.optimize.js +++ b/resources/assets/build/webpack.config.optimize.js @@ -9,7 +9,7 @@ const config = require('./config'); module.exports = { plugins: [ new ImageminPlugin({ - optipng: { optimizationLevel: 7 }, + optipng: { optimizationLevel: 2 }, gifsicle: { optimizationLevel: 3 }, pngquant: { quality: '65-90', speed: 4 }, svgo: {