I'm following up to an advise by google pagespeed to optimize the static/images on our website. After i integrated grunt/imagemin with the default optimizer (jpegtran for jpg) I found that many image files are indeed optimized with an average of 20%, however the large image file that google pagespeed suggests is found to be already optimized?
Reading project/apps/frontend/static/images.optimize/<...>.jpg...OK
Writing project/apps/setup/static/images/<...>.jpg...OK
✔ project/apps/frontend/static/images.optimize/<...>.jpg (already optimized)
Grunt config:
imagemin: {
dynamic: {
options: {
optimizationLevel: 3
},
files: [{
expand: true,
cwd: '<%= ... %>/static/images.optimize/',
src: [
'**/*.{png,jpg,gif}'
],
dest: '.../images/'
}]
}
},
First, try changing the optimizationLevel. The highest compression level is 7, lowest is 0, and the default is 3.
If changing it to a higher level does not work, try using an online compressor, like kraken or tinypng, which also does jpg.