定制 croox/statamic-ai-alt 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

croox/statamic-ai-alt

最新稳定版本:v1.0.6

Composer 安装命令:

composer require croox/statamic-ai-alt

包简介

AI-powered alt text generation for Statamic assets

README 文档

README

AI-powered alt text generation for Statamic assets using OpenAI's Vision API.

AI Alt Generator in the Statamic Asset Manager

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

  1. Install the package:
composer require croox/statamic-ai-alt
  1. 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

  1. In the Assets section of the Control Panel, select one or more images
  2. Click the "Generate Alt Text" action
  3. 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

License

LICENSE
License: MIT

统计信息

  • 总下载量: 1.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-11-19