Download the PHP package el-schneider/statamic-auto-alt-text without Composer

On this page you can find all versions of the php package el-schneider/statamic-auto-alt-text. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package statamic-auto-alt-text

Statamic Auto Alt Text

Automatically generate descriptive alt text for images in Statamic v5 using AI services via Prism PHP

⚠️ Upgrading from v0.x?

Breaking Changes in v1.0: Moondream support has been removed. If you were using Moondream, switch to Ollama with a vision model like llava for local processing, or choose from 7+ cloud providers (OpenAI, Anthropic, etc.).

Migration is simple: Replace your old config with the new AUTO_ALT_TEXT_MODEL format:

See Upgrading from v0.x for full details.

Features

Installation

Publish the configuration file:

Configuration

Configure your AI provider in .env:

Supported Providers

Provider Example Model Environment Variable
OpenAI openai/gpt-4.1 OPENAI_API_KEY
Anthropic anthropic/claude-sonnet-4-5 ANTHROPIC_API_KEY
Ollama ollama/llava (local, no key needed)
Mistral mistral/pixtral-large-latest MISTRAL_API_KEY
Groq groq/llava-v1.5-7b-4096-preview GROQ_API_KEY
DeepSeek deepseek/deepseek-chat DEEPSEEK_API_KEY
xAI xai/grok-vision-beta XAI_API_KEY

Custom Providers

You can use any custom provider supported by Prism. First, register your custom provider in a service provider:

Then configure it in your .env:

See Prism's Custom Providers documentation for details on building and registering custom providers.

For advanced provider configuration (custom endpoints, timeouts, etc.), publish Prism's config:

Non-English Captions

You can customize the prompt to generate captions in your preferred language:

Usage

Automatic Generation

The addon listens for configured Statamic events (default: AssetUploaded and AssetSaving). When an asset without alt text is detected, a background job is dispatched to generate it automatically using your configured AI service.

Important: This feature requires Laravel's queue system with an asynchronous queue driver (e.g., database, redis, sqs) and a running queue worker (php artisan queue:work). The default sync driver won't work for background processing.

Optionally customize the queue configuration:

Manual Generation

For existing assets or specific workflows:

  1. Field Action: Edit an asset, find the alt text field, and click the "Generate Alt Text" action
  2. Statamic Action: In an Asset container, use the "Generate Alt Text" action from the contextual menu
  3. CLI Command: Process assets in bulk with:

See php please auto-alt:generate --help for options to specify containers, assets, and overwriting behavior

Using Local Ollama

For privacy or compliance reasons, you can run vision models locally with Ollama:

  1. Set up Ollama: Install Ollama and pull a vision model: ollama pull llava
  2. Configure the addon:

  3. Configure Prism: Publish Prism's config and set the Ollama endpoint:

Then update config/prism.php:

Generation Parameters

Fine-tune the AI generation with these environment variables:

Upgrading from v0.x

If upgrading from v0.x, update your environment variables:

Before (v0.x)

After (v1.x)

Breaking changes:


All versions of statamic-auto-alt-text with dependencies

PHP Build Version
Package Version
Requires statamic/cms Version ^6.0
prism-php/prism Version ^0.99 || ^0.100
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package el-schneider/statamic-auto-alt-text contains the following files

Loading the files please wait ...