Automate Alt and Title Text for Images

Grafik zeigt gestapelte Produktfotos mit Berglandschaft, daneben funkelt ein türkises KI-Symbol
from 399,00 EUR
plus 19 % VAT
Product no.:
41560
Minimum time until start of work, if booked today:
In this Version:
Price


The Problem

Empty ALT attributes are a classic issue in e-commerce SEO—and, following the BFSG (Accessibility Act), an accessibility issue as well. With 2,000 products and three images each, we are talking about 6,000 text fields. No one does this manually. And the usual workarounds—copying the product name into every ALT field or displaying it there via code—don't help Google or screen readers at all: If all six images of a product are labeled "Bosch Cordless Screwdriver GSR 18V," none of them actually describe what is visible.

The Solution

The module uses Claude (Anthropic) to analyze each product image and generate both ALT and title text for it. The crucial difference compared to a standard image recognition tool: It reads the product name, short description, and full description first, then the image.

As a result, the ALT text doesn't just say "a tool on a white background," but rather "Bosch GSR 18V-45 with bit inserted and auxiliary handle attached"—using your words and your product names.

For multilingual shops, a single request covers all languages. The image is transmitted and paid for only once, regardless of whether you offer one language or five.

What the module handles for you

New images are automatically detected—from both directions.
The module captures images uploaded via the product admin interface the moment they are saved. For images written directly to the database by your ERP system, a scan runs during every cron job cycle to locate them—since there is no standard hook available for a module to latch onto in that scenario.

A to-do list that doubles as a log.
Under Utilities → Image Texts (AI), you can view the status for each image, the generated texts for each language, error messages (if applicable), and current token usage. No flying blind, no juggling separate Excel lists.

And it cleans itself up.
Completed entries disappear after 30 days, while error entries remain for 90 days—both settings are adjustable. Entries related to deleted products or images are removed immediately. Naturally, the generated ALT and title texts remain unaffected; only the log entry itself is cleared.

Two automated options.
For modified version 3.0.0 and later, it runs as an entry under **Utilities → Scheduled Tasks**.
For older shops—and for large catalogs—the module includes its own key-protected cron job. The two methods prevent conflicts with each other, ensuring you never pay twice for the same image.

Database limits are strictly observed, not estimated.
The module reads the actual column width from the current database schema and always selects the lower value between your SEO settings and MySQL's maximum limit. There is no silent text truncation, and shops with widened columns benefit automatically.

What you keep

- Manually entered text remains as is. By default, only empty fields are filled. An image containing pre-existing text never even reaches the API—so it incurs no cost. However, if someone in your shop fills all the fields with, say, the product name or something equally nonsensical, you can press an "Overwrite existing text" button to replace everything in one go. This only happens through a deliberate manual click—never via a cron job.

- No core patches. It uses only official modified hooks; no shop files are altered. A shop update won't touch anything created by this module.

- Cost control. Nothing starts running on its own: the automation is set to *false* after installation. You can test it on twenty images, check the usage, and then activate it.

Costs

You need your own API key from Anthropic (console.anthropic.com). Billing happens directly there based on token usage—the module adds no markups and handles no billing itself.

Three models are available to choose from: Claude Opus 5 for the best text quality,
plus Sonnet 5 and Haiku 4.5, which are significantly more affordable. By default, the small `info_images` variant is used for analysis instead of the original image—this is the biggest factor influencing costs and is perfectly adequate for generating an image description.

The token counter in the image list shows you your current usage at a glance.

Summary of recommendations:

Service       ~Cost/image*
Opus 5        When details must be precise: tools, spare parts, machinery, electronics, fashion    ~2 cents / image
Sonnet 5      Solid standard for easily photographed goods: decor, furniture, household items, toys    ~0.8 cents / image
Haiku 4.5     Initial broad pass over a large catalog without specific descriptions; better than nothing    ~0.4 cents / image

* Estimated (not measured) sample prices: ~1,500 input and ~500 output tokens per image (info_image ~500×500 px, medium-length description, two languages)

Security in a nutshell

Not everything the AI ​​writes should simply go straight into your shop.
Before text is saved, the module strips out anything that isn't standard text—such as HTML, quotation marks, or line breaks. Even if a supplier's description contains nonsense designed to trick the AI ​​into doing something unexpected, only harmless body text ends up in your shop.

Your API key represents money. Create a dedicated key for this specific shop via Anthropic and set a spending limit on it. That way, nothing can cost more than that limit—no matter what goes wrong.

The cron job URL includes a secret key. Without it, no one from the outside can trigger a run. And if the URL ever ends up somewhere it shouldn't be: just click "Renew cron job key," and you're all set.

Main image: please read this carefully

By default, modified only provides ALT and title fields for additional images.
In the template, the main image always uses the product name—there is simply no field for this in the shop database.

VARIANT 1
For additional images, the module therefore starts working immediately after installation, without you having to do anything need to modify the template.

VARIANT 2
If you want to include the main image, the module can optionally create two dedicated fields, display them in the product form, and populate them. To ensure the text appears in the shop, one line in the template must be modified. Without this change, the text is saved but not displayed; nothing will break.

Requirements

- modified eCommerce Shopsoftware 2.0.5 – 3.3
- PHP 8.0 or newer, PHP cURL extension
- Outbound HTTPS connections to `api.anthropic.com`
- A Claude API key from Anthropic