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/' }] } },
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.