Skip to content

Instantly share code, notes, and snippets.

View dmitry-stepanenko's full-sized avatar

Dmitriy Stepanenko dmitry-stepanenko

View GitHub Profile
@tomchentw
tomchentw / README.md
Last active March 2, 2022 07:42
Auto compress images with husky, lint-staged and imagemin

The flow

husky (setup git commit hooks) -> lint-stages (run specific commands by file type) -> imagemin (minify files)

git add -A
git commit # It will compress your images into git repo now

Since the images is now fully compressed, no extra steps is required by webpack/browserify……whatever.