Show HN: Auto-optimize and upload images with AI alt text

1 cagrisarigoz 0 5/29/2025, 2:32:14 AM github.com ↗
I've been manually optimizing images for web projects by resizing, converting formats, uploading to S3, and writing alt text.

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.

Comments (0)

No comments yet