Bulk Image Alt Text Generator
Generate SEO-optimized alt text for an entire folder of images using Claude AI's vision. Scan HTML files for missing alt tags and optionally write them back automatically. Great for WordPress, Shopify, and accessibility compliance.
Download from GitHub
Free and open source. Process hundreds of images for under a dollar with claude-haiku.
View on GitHub →What it does
Uses Claude AI's vision capabilities to actually look at each image and write accurate, descriptive alt text. Supports local image folders, scanning HTML files for missing alt attributes (and optionally writing them back), and batch processing a list of image URLs.
Features
- Process entire folders of images (.jpg, .png, .webp, .gif, .bmp)
- Scan HTML files and find images with missing alt attributes
- Write fixed alt text back to HTML with
--fix - 4 style modes: descriptive, SEO-optimized, concise, e-commerce
- Add page context to improve relevance
- Export results to CSV or JSON
Quick start
git clone https://github.com/Get-Ai-Tools/bulk-image-alt-generator cd bulk-image-alt-generator pip install -r requirements.txt # Process a folder of images python alt_generator.py --api-key sk-ant-... --folder ./images # SEO style with context python alt_generator.py --api-key sk-ant-... --folder ./product-photos \ --style seo --context "women's fashion e-commerce store" # Fix missing alt tags in an HTML file python alt_generator.py --api-key sk-ant-... --html index.html --fix --missing-only
Style options
- descriptive - full description for accessibility compliance
- seo - keyword-rich, under 125 characters
- concise - 5-10 words, great for icons
- ecommerce - product + color + key feature format
Requirements
- Python 3.8+
requests,anthropic(auto-installed)- Claude API key - get one free at console.anthropic.com
How much does it cost per image?
Using claude-haiku, each image costs roughly $0.001-$0.003 to process. You can generate alt text for 500 images for under $1.50.
Can I use this for WordPress?
Yes. Export the results as CSV, then use WordPress's bulk import tools or a plugin like WP All Import to update alt text for your media library images in bulk.