DEV Community

Cover image for How I built a free WordPress plugin that auto-generates image alt text using AI
Lidor Asulin
Lidor Asulin

Posted on

How I built a free WordPress plugin that auto-generates image alt text using AI

The problem I kept running into

Every time I ran an accessibility or SEO audit on a WordPress site,
the same issue came up: 60-80% of images had no alt text.

It's not that people don't care. Writing alt text for hundreds of
images manually is genuinely painful — so people just skip it.

I decided to fix this once and for all.

What I built

EzAlt AI — a free WordPress plugin that generates alt text
automatically using AI vision models.

Here's what it does:

  • Bulk generation — scan your entire Media Library and generate alt text for every image missing it, in one click
  • Auto-generate on upload — every new image gets alt text automatically
  • Per-image generation — generate directly from the Media Library attachment page
  • Never overwrites — if an image already has alt text, it's skipped
  • Context-aware — the plugin sends the parent post title, categories, and content type (including WooCommerce products) to the AI, so the output is relevant — not generic

Tech stack

  • PHP (vanilla, no framework)
  • OpenRouter for routing requests to vision AI models
  • Freemius for optional credit pack licensing
  • WordPress cron for bulk jobs (no Action Scheduler dependency)

API requests are idempotent — retries never double-charge credits.

The result

A plugin that works out of the box. Install → activate → done.
Free starter credit included, no card required.

Try it

Free on WordPress.org:
👉 https://wordpress.org/plugins/altmagic-ai-image-alt-text/

Happy to answer any questions about the implementation!

Top comments (0)