ImageMin helps to compress the gif, jpeg, and png files. This takes care of compressing both static and dynamic images. This will assist in improving the rendering of webpages using images of big size.
ImageMin
Installing the Imagemin plug-in could be achieved through below code
Imagemin plug-in
$ npm install grunt-contrib-imagemin --save-dev
Note: There is limit to the image file size. This cannot optimize files of huge size.