Angular

Compress images in build version

npm install --global imagemin-cli
imagemin 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