croox / statamic-ai-alt
AI-powered alt text generation for Statamic assets
Installs: 143
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 1
Type:statamic-addon
Requires
- php: ^8.1
- openai-php/client: ^v0.8.0
- openai-php/laravel: ^v0.8.0
- statamic/cms: ^4.0|^5.0
README
AI-powered alt text generation for Statamic assets using OpenAI's Vision API.
Features
- Automatically generates alt text for images using OpenAI's Vision API
- Works with JPG, PNG, Webp and GIF files (SVG is not supported)
- Available in both list and detail views (Statamic 5+)
- Queued job processing to handle large batches
Requirements
- Statamic 5.0+
- PHP 8.1+
- OpenAI API key
- Laravel Queue worker (for background processing)
Installation
- Install the package:
composer require croox/statamic-ai-alt
- Add your OpenAI API key and the target lanuage to your
.env
file:
# API Key OPENAI_API_KEY=<your-api-key-here> # Set the language for alt text generation prompt. OPENAI_ALT_LANGUAGE="English"
Usage
- In the Assets section of the Control Panel, select one or more images
- Click the "Generate Alt Text" action
- The alt text will be generated in the background and saved to your assets
Future ideas / missing features
- Support SVG
- Check for existing alt text before overriding with API results