Download for Google Chrome (opens in a new tab)
Download for Edge (opens in a new tab)
Download for Firefox (opens in a new tab)Newsletter
New laws and deadlines, court rulings, enforcement and WCAG changes. A short summary once a week, and an e-mail straight away when something important happens. Unsubscribe at any time.
A Composer library that connects any PHP application with the alt generator, with or without a framework.
Packagist (Composer)
The dockcodes/dockaccess-alt-generator library works on PHP 7.4 and newer with the curl and json extensions. It is the core of our WordPress, Joomla, Laravel and Symfony integrations, and you can use it directly in your own application.
You connect the site once, with ConnectionClient, the site token and your DockAccess login. You keep the account key and the secret in the server configuration; the password is used only to connect.
Install the library with Composer (PHP 7.4 or newer):
composer require dockcodes/dockaccess-alt-generator
Connect the site once with its token and your DockAccess login, then keep the account key and the secret on the server:
use Dock\AltGenerator\Config; use Dock\AltGenerator\Connection\ConnectionClient; use Dock\AltGenerator\Connection\ConnectRequest; $connection = (new ConnectionClient(Config::anonymous()))->connect( ConnectRequest::create($siteToken, $email, $password, 'php', 'https://example.com') );
Store $connection->accountKey() and $connection->secret() in the server configuration. The password is used only to connect; do not store it.
Generate alt texts:
use Dock\AltGenerator\AltGenerator; use Dock\AltGenerator\Image\ImageSource; $generator = new AltGenerator(Config::create($accountKey)); $alt = $generator->generate(ImageSource::fromFile($path, [$uploadsDir]))->alt()->text();
An AltGenerator created with the account key returns the description of an image (ImageSource); where to save it is up to your application. Handle the limit errors and process larger sets in batches, as the Knowledge base articles tab shows.
The free plan describes 10 images a day on one site. Paid plans count images a month: Starter 500, Pro 2,000 and Agency 20,000. The limit counts the images described in your DockAccess account and by every integration together.
Check a generated description before you publish it, especially names, numbers and the text visible in the picture. A decorative image should have an empty alt, and an image that is the only content of a link describes where the link goes.
To write a description, the AI service gets the image, the language and the context and tone you set.
The AI generator writes alt texts for your images in your CMS or in your own code.
See the installationFree up to 10 images a day.