A CLI wrapper around imagemin designed specifically for use with lint-staged (git pre-commit hooks). Version 0.5.1 is the latest stable release. It compresses PNG, JPEG, GIF, and SVG images automatically during staged file checks, with sensible default plugins (mozjpeg, optipng, svgo, gifsicle). Unlike using imagemin directly, it integrates seamlessly into lint-staged configurations without any configuration overhead. The package is lightweight (no peer dependencies) and runs synchronously to fit lint-staged's workflow.
npm install imagemin-lint-stagedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to integrate imagemin-lint-staged with lint-staged to automatically compress images on commit.
Ensure image files are valid before committing, or add a fallback to skip compression on error.
If custom options are needed, use imagemin directly instead of this package.
Run 'npm install --save-dev imagemin-lint-staged' from the project root.
Ensure lint-staged is configured to run 'imagemin-lint-staged' as a string (not a function). The binary is provided via the package's bin field.
No dependency data recorded yet.