Built this project to automate the whole pipeline, and wanted to open source it for the community.
What it does:
- Analyzes images and picks optimal format (WebP/JPEG/PNG) based on content
- Batch processes from CSV or local files
- Generates alt text via AltText.ai API
- Uploads to S3 with CloudFront URLs
- Includes REST API for integration
The format detection compares output sizes across formats, rather than relying on file extension rules. Saves significant bandwidth - saw 40-60% size reductions on most images.
Also built an enhanced pre-commit script that auto-fixes linting issues and updates vulnerable dependencies.
Setup:
Clone repo, run setup script, add AWS creds. No external dependencies beyond AWS and optional AltText.ai API. Includes example files.
Would appreciate feedback on the format selection algorithm or suggestions for additional optimizations.