Compress images in build version

npm install --global imagemin-cliimagemin src/assets/images/* --out-dir=dist/angular-bvbmedia/assets/images/

To automate this process add the following lines to package.json:

"build": "ng build --prod"
"postbuild": "imagemin src/assets/images/* --out-dir=dist/angular-bvbmedia/assets/images/"

And from now build the project by running the npm command:

npm run build
Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp