hnrobert/Git Image Preprocessor
Automatically compress and optimize images in commits and pull requests
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| quality | Compression quality for JPEG/WebP (1-100, default: 85) | no | 85 |
| max-width | Maximum width in pixels (0 = no limit, default: 0) | no | 0 |
| max-height | Maximum height in pixels (0 = no limit, default: 0) | no | 0 |
| convert-to | Target format to convert to when set (jpg/png/webp). If empty, conversion is disabled. | no | "" |
| git-user-name | Git user name for commits (default: github-actions[bot]) | no | github-actions[bot] |
| git-user-email | Git user email for commits (default: github-actions[bot]@users.noreply.github.com) | no | github-actions[bot]@users.noreply.github.com |
| commit-message | Commit message for optimized images (default: "🖼️ Optimize images") | no | 🖼️ Optimize images |
| file-patterns | File patterns to process (default: "*.jpg *.jpeg *.png *.webp") | no | *.jpg *.jpeg *.png *.webp *.heic *.heif *.avif *.tiff *.bmp *.gif |
| skip-ci | Add [skip ci] to commit message (true/false, default: false) | no | false |
| remove-exif | Remove EXIF metadata from images (true/false, default: true) | no | true |
| max-size-kb | Target maximum size for converted image in KB (default 0 disables) | no | 0 |
| scan-whole-repo | Scan entire repository (true) or only changed files in PR (false, default: false) | no | false |
Outputs
| name | description |
|---|---|
| optimized-count | Number of images optimized |
| total-saved | Total bytes saved |
| files-changed | List of changed files |