WP Manifestindependent plugin directory
manifest / ai / image-metadata

Image Metadata

Writes the alt text, caption and title of images in the media library using the AI provider already configured in WordPress. Existing values are never overwritten.

by George Vasiliades · github.com/poseidonas/image-metadata · website

0stars
1release downloads
0forks

Install

The author publishes release zips, so WP-CLI can install straight from GitHub:

wp plugin install https://github.com/poseidonas/image-metadata/releases/download/v1.0.0/image-metadata.zip

Declares an update source (https://github.com/Poseidonas/image-metadata), so updates arrive through the plugin's own updater.

Readme

Image Metadata

Latest release WordPress 7.0+ PHP 8.0+ License GPL-2.0-or-later

Writes the alt text, caption and title of images in the media library using the AI provider already configured in WordPress. Existing values are never overwritten.

What it does

Alt text is both an accessibility requirement and something search engines read, and almost no media library has it. Filling it in by hand for a few thousand images is not work anybody does.

WordPress 7.0 added an AI client to core. Providers and their keys are configured once by the site owner under Settings, Connectors, and any plugin can then use them. This plugin never asks for a key of its own and never sells a subscription. It calls the provider the site already has, so every request is on your own account and under your own terms.

Three fields are written, each only when it is empty:

  • Alt text, when the image has none at all.
  • Caption, when the caption is empty.
  • Title, only while the title is still the one WordPress made from the file name.

The title rule matters, because WordPress never leaves a title empty: it fills it with the file name. A title is treated as machine made when it equals the file name, when it equals the file name with the extension still attached, or when sanitize_title() of either matches. Anything a person typed is kept.

All three fields come from one request. The plugin asks the provider for a JSON object with only the fields that are actually missing, which costs a third of what three separate requests would, and keeps the three texts consistent with each other.

The image sent to the provider is the medium derivative read from disk, not the full size original, and not a URL the provider has to fetch.

Three ways to run it

Route How it behaves
New uploads A single scheduled event runs 30 seconds after the image is added, so the upload itself is never held up. Registered for every upload path, including WP-CLI, the REST API and front end forms, not only the media screen. Off by default, because each image costs a request.
One image A Write metadata link in the row actions of the media list. A nonce protected request to admin-post.php, then back to where you were with a notice. No JavaScript anywhere.
The whole library A scheduled task that handles a batch, then schedules the next one a minute later, until the library is done or the daily limit is reached. When the limit is reached it schedules itself for the next midnight UTC instead of stopping.

The bulk run keeps no list of pending images. Each image gets a _icxcnika_image_status meta value of done, skipped or failed, and the next batch is simply the newest images that have no status yet. Nothing to corrupt, nothing to resume, and an interrupted run continues where it left off.

Settings

Settings > Image Metadata.

What is written

Setting Effect Default
Alt text Written only when the image has no alt text at all On
Caption Written only when the caption is empty On
Title Written only while the title is still the one WordPress made from the file name On
Longest alt text Characters, between 40 and 300. 125 is the length screen readers handle comfortably. The value is both requested in the schema and enforced after the answer arrives 125
Instruction to the model Leave empty for the built in instruction. The language of the site is added automatically empty

When it runs

Setting Effect Default
Write metadata for new uploads Schedules one event 30 seconds after an image is added Off
Provider Whichever WordPress selects, or a specific one. Providers with no key are listed and marked as such Whichever WordPress selects
Show a Metadata column in the media list States which of the switched on fields each image is still missing On

Limits

Setting Effect Default
Images per day Counted from midnight UTC across every route. Only images that actually cost a request are counted, so skipped images are free. Between 1 and 5000 100
Images per run How many images each scheduled batch handles. Between 1 and 25 5
Smallest image Pixels. Images narrower or shorter than this are skipped, which keeps icons and spacers out. Zero switches the check off. Between 0 and 2000 200

What is skipped, and why

  • Anything that is not image/jpeg, image/png, image/webp, image/gif or image/avif. SVG is never sent.
  • Images smaller than the minimum size in either dimension. Images with no stored dimensions are not skipped.
  • Images that already have every switched on field.

Skipped images are marked skipped so the bulk run does not look at them again, and they never count against the daily limit.

Honest limits

  • Every image is one request billed to your own provider account. The settings page says so, and the daily limit exists for that reason.
  • A model can describe an image incorrectly, or miss what matters about it. Generated text should be reviewed, especially on pages where the image carries meaning.
  • Purely decorative images should have empty alt text, not a description. The plugin cannot tell decorative from meaningful, so leave those out of the run or clear them afterwards.
  • Scheduled work depends on WP-Cron, which needs traffic or a real cron job to fire.

Filters

  • icxcnika_image_settings - all settings before they are applied.
  • icxcnika_image_pre_generate - receives null, the attachment ID and the list of missing fields. Return an array with alt, caption or title keys to supply the values yourself, and no request is made. This is also how the plugin can be driven by a different service.
  • icxcnika_image_language - the locale used to tell the model which language to write in.
  • icxcnika_image_registry_payload - data sent to the installation registry.

Data stored

  • Option icxcnika_image_settings (the settings).
  • Option icxcnika_image_usage (the date and the number written that day, not autoloaded).
  • Option icxcnika_image_state (whether a bulk run is in progress, not autoloaded).
  • Option icxcnika_image_registry_key (random installation key of 48 characters, created only if installation reporting is active).
  • Post meta _icxcnika_image_status on each image looked at, holding done, skipped or failed.
  • Post meta _icxcnika_image_error on images that failed, holding the first 300 characters of the message.
  • Transient icxcnika_image_release (cached GitHub release lookup, 12 hours).
  • Cron events icxcnika_image_batch (the bulk run, single events chained a minute apart), icxcnika_image_single (one image after upload) and icxcnika_image_registry_ping (weekly, only if installation reporting is active).

Installation reporting

On activation, on deactivation and once a week the plugin sends a small JSON message to the author's installation registry: plugin slug, plugin version, home URL, site URL, WordPress version, WooCommerce version if present, PHP version, locale and whether the site is a multisite. Each report carries a random installation key generated locally on first use. The reporting address is empty by default, which means nothing is sent at all. No content, no user data, no personal data and no images are ever sent to the author. Add define( 'ICXCNIKA_REGISTRY_DISABLE', true ); to wp-config.php to turn the reporting off, or define( 'ICXCNIKA_REGISTRY_URL', '...' ); to point it elsewhere.

Updates

Updates are delivered from GitHub Releases of this repository. WordPress shows them on the Plugins screen like any other update, together with the details view and the automatic updates link.

Uninstall

Deleting the plugin removes the four options, both post meta keys from every image, the transient and all three cron events. Metadata that was written stays on the images, because it belongs to the media library and not to the plugin.


Image Metadata (Ελληνικά)

Γράφει το alt text, τη λεζάντα και τον τίτλο των εικόνων της βιβλιοθήκης πολυμέσων μέσω του παρόχου AI που έχει ήδη ρυθμιστεί στο WordPress. Οι υπάρχουσες τιμές δεν αντικαθίστανται ποτέ.

  • Δημιουργός: George Vasiliades - https://github.com/Poseidonas
  • Άδεια: GPL-2.0-or-later
  • Απαιτεί WordPress 7.0+ και PHP 8.0+

Τι κάνει

Το alt text είναι ταυτόχρονα απαίτηση προσβασιμότητας και κείμενο που διαβάζουν οι μηχανές αναζήτησης, και σχεδόν καμία βιβλιοθήκη πολυμέσων δεν το έχει. Η συμπλήρωσή του στο χέρι για μερικές χιλιάδες εικόνες δεν είναι δουλειά που κάνει κανείς.

Το WordPress 7.0 πρόσθεσε AI client στον πυρήνα. Οι πάροχοι και τα κλειδιά τους ρυθμίζονται μία φορά από τον ιδιοκτήτη του site στις Ρυθμίσεις, Connectors, και από εκεί και πέρα κάθε πρόσθετο μπορεί να τα χρησιμοποιήσει. Αυτό το πρόσθετο δεν ζητά ποτέ δικό του κλειδί και δεν πουλά συνδρομή. Καλεί τον πάροχο που έχει ήδη το site, οπότε κάθε αίτημα χρεώνεται στον δικό σας λογαριασμό και με τους δικούς σας όρους.

Γράφονται τρία πεδία, το καθένα μόνο όταν είναι κενό:

  • Alt text, όταν η εικόνα δεν έχει καθόλου.
  • Λεζάντα, όταν η λεζάντα είναι κενή.
  • Τίτλος, μόνο όσο ο τίτλος είναι ακόμα αυτός που έφτιαξε το WordPress από το όνομα αρχείου.

Ο κανόνας του τίτλου έχει σημασία, επειδή το WordPress δεν αφήνει ποτέ κενό τίτλο: τον συμπληρώνει με το όνομα αρχείου. Ένας τίτλος θεωρείται αυτόματος όταν ισούται με το όνομα αρχείου, όταν ισούται με το όνομα αρχείου μαζί με την κατάληξη, ή όταν ταιριάζει το sanitize_title() οποιουδήποτε από τα δύο. Ό,τι έγραψε άνθρωπος διατηρείται.

Και τα τρία πεδία προκύπτουν από ένα αίτημα. Το πρόσθετο ζητά από τον πάροχο ένα αντικείμενο JSON με μόνο τα πεδία που πράγματι λείπουν, πράγμα που κοστίζει το ένα τρίτο σε σχέση με τρία ξεχωριστά αιτήματα και κρατά τα τρία κείμενα συνεπή μεταξύ τους.

Η εικόνα που στέλνεται είναι το παράγωγο medium διαβασμένο από τον δίσκο, όχι το πρωτότυπο πλήρους μεγέθους και όχι URL που πρέπει να κατεβάσει ο πάροχος.

Τρεις τρόποι εκτέλεσης

Διαδρομή Συμπεριφορά
Νέα αρχεία Ένα μονό προγραμματισμένο event 30 δευτερόλεπτα μετά την προσθήκη της εικόνας, ώστε το ίδιο το ανέβασμα να μην καθυστερεί ποτέ. Δηλώνεται για κάθε διαδρομή ανεβάσματος, μαζί με WP-CLI, REST API και φόρμες front end, όχι μόνο για την οθόνη πολυμέσων. Ανενεργό από προεπιλογή, επειδή κάθε εικόνα κοστίζει ένα αίτημα.
Μία εικόνα Σύνδεσμος Συγγραφή μεταδεδομένων στις ενέργειες γραμμής της λίστας πολυμέσων. Αίτημα με nonce προς το admin-post.php και επιστροφή εκεί που ήσασταν με σχετικό μήνυμα. Χωρίς καθόλου JavaScript.
Ολόκληρη η βιβλιοθήκη Προγραμματισμένη εργασία που χειρίζεται μια παρτίδα και προγραμματίζει την επόμενη ένα λεπτό αργότερα, μέχρι να ολοκληρωθεί η βιβλιοθήκη ή να συμπληρωθεί το ημερήσιο όριο. Όταν συμπληρωθεί το όριο, προγραμματίζεται για τα επόμενα μεσάνυχτα UTC αντί να σταματήσει.

Η μαζική εκτέλεση δεν κρατά λίστα εκκρεμών εικόνων. Κάθε εικόνα παίρνει meta _icxcnika_image_status με τιμή done, skipped ή failed, και η επόμενη παρτίδα είναι απλώς οι νεότερες εικόνες που δεν έχουν ακόμα κατάσταση. Τίποτα δεν μπορεί να αλλοιωθεί, τίποτα δεν χρειάζεται συνέχιση, και μια διακοπτόμενη εκτέλεση συνεχίζει από εκεί που έμεινε.

Ρυθμίσεις

Ρυθμίσεις > Image Metadata.

Τι γράφεται

Ρύθμιση Ενέργεια Προεπιλογή
Alt text Γράφεται μόνο όταν η εικόνα δεν έχει καθόλου alt text Ενεργό
Λεζάντα Γράφεται μόνο όταν η λεζάντα είναι κενή Ενεργό
Τίτλος Γράφεται μόνο όσο ο τίτλος είναι ακόμα αυτός που έφτιαξε το WordPress από το όνομα αρχείου Ενεργό
Μέγιστο μήκος alt text Χαρακτήρες, από 40 έως 300. Το 125 είναι το μήκος που χειρίζονται άνετα οι αναγνώστες οθόνης. Η τιμή ζητείται στο schema και επιβάλλεται και μετά την απάντηση 125
Οδηγία προς το μοντέλο Κενό για την ενσωματωμένη οδηγία. Η γλώσσα του site προστίθεται αυτόματα κενό

Πότε εκτελείται

Ρύθμιση Ενέργεια Προεπιλογή
Συγγραφή μεταδεδομένων για νέα αρχεία Προγραμματίζει ένα event 30 δευτερόλεπτα μετά την προσθήκη εικόνας Ανενεργό
Πάροχος Όποιον επιλέξει το WordPress, ή συγκεκριμένος. Οι πάροχοι χωρίς κλειδί εμφανίζονται και σημειώνονται ως τέτοιοι Όποιον επιλέξει το WordPress
Εμφάνιση στήλης Μεταδεδομένα στη λίστα πολυμέσων Δηλώνει ποια από τα ενεργά πεδία λείπουν ακόμα από κάθε εικόνα Ενεργό

Όρια

Ρύθμιση Ενέργεια Προεπιλογή
Εικόνες ανά ημέρα Μετρούνται από τα μεσάνυχτα UTC για κάθε διαδρομή. Μετρούνται μόνο οι εικόνες που πράγματι κοστίζουν αίτημα, οπότε οι παραλειπόμενες είναι δωρεάν. Από 1 έως 5000 100
Εικόνες ανά εκτέλεση Πόσες εικόνες χειρίζεται κάθε προγραμματισμένη παρτίδα. Από 1 έως 25 5
Ελάχιστο μέγεθος εικόνας Εικονοστοιχεία. Εικόνες στενότερες ή χαμηλότερες από αυτό παραλείπονται, ώστε να μένουν εκτός τα εικονίδια και τα κενά. Το μηδέν απενεργοποιεί τον έλεγχο. Από 0 έως 2000 200

Read the full README on GitHub →

Releases

TagPublishedAssetDownloads
v1.0.0 Aug 18, 2026 image-metadata.zip 1