Skip to content

RESOURCES / BLOG

Automating Alt Text Generation for Existing Images in Cloudinary With MediaFlows

Why It Matters

Automating alt text generation for existing images helps you:

  • Quickly improve your website’s accessibility.
  • Meet compliance standards.
  • Enhance SEO performance.
  • Save time compared to manually captioning each image.

Enhancing accessibility is a must for any modern website. While Cloudinary makes it easy to generate alt text automatically for newly uploaded images, many users also need to retroactively add alt text to images already stored in their Media Library. Fortunately, Cloudinary MediaFlows makes that possible with no code required.

In this post, we’ll walk through how to generate alt text for existing images in your Cloudinary account using the Cloudinary AI Content Analysis add-on and a custom MediaFlow.

A flow starting with DAM App, connected to AI Generate Alt Text, connected to Update Alt Text

Start by setting up a MediaFlow with the following three steps:

This allows the MediaFlow to be run manually from the Media Library.

  • No special parameters needed.
  • Ensure Output as array is toggled off.
In the DAM App, Output as array option is toggled off.

Uses Cloudinary’s Image Captioning model to create alt text for each image.

AI Generate Alt Text block settings

Saves the generated alt text to the image’s contextual metadata.

  • Metadata Key: alt
  • Metadata Value: {{$.AI_Generate_Alt_Text.result.caption}}
  • Action: Add-or-update
Update Alt Text block settings

Once these blocks are connected and configured, activate your MediaFlow.

From your Cloudinary Media Library:

  1. Select one or more images.
  2. Click the three-dot menu.
  3. Choose Run MediaFlows.
  4. Select your custom alt-text generation MediaFlow.
Selecting images and accessing MediaFlows

Once triggered, the MediaFlow will process each selected image and update the alt metadata field with the AI-generated description.

After the MediaFlow completes, inspect any processed image by viewing its contextual metadata tab in the Media Library. You should see a new field called alt populated with the generated description.

Viewing generated alt text in metadata

Since this setup leverages MediaFlows and the Cloudinary AI Content Analysis add-on, it’s entirely no-code and scalable.

Want to take this further? You could expand the flow to tag images, flag low-confidence captions for review, or add fallback logic for missing alt text. But even this basic flow goes a long way in making your content more inclusive.

Let us know how you’re using MediaFlows to automate your workflows! Contact us today to learn more.

Start Using Cloudinary

Sign up for our free plan and start creating stunning visual experiences in minutes.

Sign Up for Free