I'm using Grunt Imagemin to optimize a folder of images. However everytime I run that command, it runs imagemin on ALL of the images. Is there a way to only run grunt imagemin when it detects new changes?
Try implementing grunt-newer :
Grunt Task for running tasks if source files are newer only .
Here you can find a short tutorial about how to use it.
After implementing it, you should prepend newer:
to the imagemin task.
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.