Reputation: 10681
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?
Upvotes: 5
Views: 1144
Reputation:
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.
Upvotes: 2