A images size checker use in pre-commit
npm install husky // use husky to run precommit script
npm install lint-staged // lint staged code and we hack this to check images size in staged as well
npm install img-size-checker
"precommit": "lint-staged",
"lint-staged": {
"*.{jpg,png}": "img-size-checker 100" // size in kb
}
MIT