Automatically generating meaningful alt text for images in CKEditor—without writing a single line of code—is now within reach. AI-powered automation improves accessibility and streamlines content creation, allowing teams to focus on what matters most.
Alt text plays a key role in creating inclusive digital experiences, especially for users who rely on screen readers. While it’s a small part of the content workflow, it has a big impact—and AI can make it even easier to get right.
In this blog, we’ll look at how to build an AI Automator in CKEditor that generates alt text for images automatically. For example, when a content creator inserts an image of a chart comparing annual CO₂ emissions by country, the AI Automator can instantly generate alt text like “Bar chart comparing annual CO₂ emissions in the US, China, India, and EU from 2015 to 2024.”
The result: more accessible content, smoother publishing, and one less manual step.
Setting up AI assistants in CKEditor
The AI Automator module in Drupal allows for seamless AI-powered workflows inside CKEditor. Automator Chains type helps you chain multiple AI processes together (e.g., image analysis → text generation). AI can:
- Automatically generate descriptive alt text for images.
- Enhance accessibility by ensuring all images have meaningful alt text.
- Improve SEO by adding relevant alt text to images.
The use case
Alt text is crucial for accessibility, helping visually impaired users understand images. Instead of manually adding alt text for each image.
Prerequisite
- Enable the following modules:
- AI Core
- AI Automator
- AI CKEditor
- OpenAI Provider
- Add an OpenAI key in /admin/config/system/keys.
- Select the API key added as an AI provider in /admin/config/ai/providers/openai.
Steps to configure the AI Automator
To create an AI Automator Chain Type for generating alt text from images, you first need to navigate to the Automator Chain Types configuration page. After adding a new chain type, you will define input and output fields to process the image and store the generated alt text.
- Navigate to /admin/config/ai/automator_chain_types and click on Add Automator Chain Types to create an AI Automator chain type.
- Name the Automator chain type: Generate Alt Text from Image.
- Save the chain type and edit it to add fields. All the automator chains you define will require these three types of fields.
- Input field: An image field (required) named Input Image.
- Output field: A text field named Image Alt Text.
- Formatted long text field: A field named Output Image with Alt Text to store the generated result.

Configuring the AI Automator for the fields
1. Enable AI Automator for Image Alt Text
You now need to edit the Image Alt Text field, configure the AI Automator settings, define the input mode and prompt, and set the AI provider.
- Edit Image Alt Text and enable the Enable AI Automator checkbox.
- Select Automator Input Mode to Advanced Mode (Token) option.
- Select Choose AI Automator Type as LLM: Text(Simple)
- In Automator Prompt (Token), add the following prompt:
Generate an alt text for the input image in less than 5 words.
Input image: [automator_chain:field_input_image]

- Enable Edit when changed.
- Select Automator Worker as Direct - Processes and saves the value directly.
- Select AI Provider as OpenAI.

- Select Image field as Input Image
- Save the settings.

2. Enable AI Automator for Output Image with Alt Text
To enable AI Automator for Output Image with Alt Text, you need to similar settings with appropriate prompt.
- Edit Output Image with Alt Text and enable the Enable AI Automator.
- Select Automator Input Mode as Advanced Mode (Token).
- Select Choose AI Automator Type as LLM: Text(Simple)
- Add the following Automator Prompt (Token) (appropriate prompt as requirement) :
Generate the output in the below format :
<img src="[automator_chain:field_input_image:entity:url]" data-entity-uuid="[automator_chain:field_input_image:entity:uuid]" alt="[automator_chain:field_image_alt_text]">

- Enable Edit when changed.
- Set the Automator Weight to 110 (so it runs after the Image Alt Text automator).
- Select AI Provider as OpenAI.

- Set Use text format to Basic HTML.
- Save the settings.
Enabling AI Automator in CKEditor
Enable AI Automator in CKEditor, by configuring the text format settings, here you will add the AI CKEditor plugin for the text format and enable AI Automators, and setting up the image alt text generation settings for ckeditor.
- Navigate to /admin/config/content/formats and configure the text format (e.g., Basic HTML).
- Add AI CKEditor plugin to the Active Toolbar.
- In CKEditor 5 plugin settings, open the AI Tools section.

- Scroll down to see AI Automator CKEditor, click it and enable AI Automators. Here you can see your newly created ai automator chain type - Generate Alt Text from Image - listed.
- Enable Generate Alt Text from Image settings and select:
- Input field: Input Image
- Text Selection Input: Input Image
- Require Selection: Checked (ensures the selected image is used as input).
- Write Mode: Replace (generated output replaces selected input).
- Output field: Output Image with Alt Text

Testing the AI Automator chain type
To test the AI Automator Chain Type, you should now create an article and insert an image in CKEditor.
- Create article content.
- In the CKEditor field, add an image.
- Select the image and click on the AI Assistant plugin dropdown to see the Generate Alt Text from Image automator enabled in the list.
- Click on Generate Alt Text from Image to open the AI Assistant modal.
- The selected image appears in the upload field.

- Click Generate and wait for AI to process the image.
- Once done, the generated alt text appears in the response field.
- Click Save changes to editor and verify the image has the new alt text.

This feature can be extended for media reference entities as well once the ticket is closed.
Real-world applications
This AI-powered CKEditor assistant can be useful for:
Accessibility Tools: Improve image descriptions for visually impaired users.
SEO Optimization: Enhance image searchability with meaningful alt text.
Content Automation: Streamline the process of adding alt text to images.
Conclusion
AI assistants in CKEditor are already reshaping content creation. With the AI Automator module for Drupal, you can generate meaningful alt text for images—without writing a single line of code. From improving accessibility to enhancing SEO and removing repetitive steps, AI is making content workflows faster and more intentional.
A 2024 study found that 88% of marketers use AI daily, and 68% of service professionals rely on it for content creation. Even small businesses are part of the shift—98% use AI enabled services and 40% are experimenting with generative models.
Drupal is keeping pace. With support for OpenAI, Azure, Cohere, and others, its growing AI ecosystem brings model-based automation directly into the editor. The AI Automator handles everything from alt-text suggestions to smart content tweaks—already used by nonprofits, publishers, and public agencies across the US, India, and Europe.
This is the start of model-driven publishing: CMS experiences that work with you. Try the AI Automator, build your assistant in CKEditor, and be part of what’s next.