=== Image AI SEO ===
Contributors: creativeskyline
Tags: seo, images, alt-text, accessibility, ai
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.3.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-generated titles, alt text, descriptions and filenames for your media library images, with a GDPR consent gate before anything leaves your site.

== Description ==

Image AI SEO optimizes the SEO attributes of your uploaded images automatically: title, alt text, description and filename are generated by an AI backend based on your focus keyword, additional keywords and a short site description.

The plugin requires an API key for the Image AI SEO service at imageaiseo.com and consumes credits for each optimization. New accounts get free starter credits; the plugin always shows the balance your account really has. You can preview the suggested changes before they are applied, run optimizations one image at a time or in bulk, and revert any change afterward.

After activation the plugin opens its Welcome tab. Once your API key is validated, the AI suggests a focus keyword, additional keywords and a website description for your site; you can review, change or request them again with "Suggest with AI".

No image data is sent to the AI backend until you have granted consent in the plugin's settings. This is a hard gate, not a setting you can miss: without consent, no request ever leaves your site.

The plugin is multisite-aware: settings, credits and consent are scoped per site, while the license key can also be managed network-wide by a network administrator.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/image-ai-seo`, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. The plugin opens its Welcome tab. Open the License tab and enter your API key.
4. Grant consent to the data transmission described in the External Services section below. Optimization is blocked until this step is completed.
5. Back on the Welcome tab, the AI fills the empty focus keyword, additional keywords and site description fields once. Review them (or use "Suggest with AI" later), then start optimizing images from the Media Library.

== Frequently Asked Questions ==

= How many free credits do I get? =

New accounts on imageaiseo.com receive free starter credits. The amount is set by the service, not by the plugin: after you validate your API key, the plugin shows the balance your account really has.

= What happens when I run out of credits? =

Credits are checked server-side before every optimization. Once your remaining credits reach zero, the plugin blocks further optimizations and shows an upsell notice pointing you to purchase more credits. No partial or unmetered requests are made.

= Do I need to grant consent, and what does it cover? =

Yes. Before any image data, API-key validation data or site data for the AI suggestions is sent, you must grant consent in the plugin's settings. See the External Services section below for exactly which data is sent, to whom, and why. You can revoke consent at any time, which immediately blocks further outbound requests.

= I use Image AI SEO Pro. What should I do? =

Image AI SEO Pro is discontinued and receives no more updates; this plugin has the same features. Install Image AI SEO, deactivate Image AI SEO Pro, activate Image AI SEO and then delete Image AI SEO Pro. The Plugins screen shows which Pro version you have:

* Image AI SEO Pro 2.3.0: your settings, API key, consent and history are kept. Both plugins use the same data, and deleting one of them never removes it while the other one is still installed.
* Older versions of Image AI SEO Pro: deleting Pro removes the settings, the API key, the consent and the history, even with Image AI SEO installed. Copy your API key and note your settings first, then enter them again in Image AI SEO and confirm the data-processing notice once more. The history cannot be kept this way. If you want to keep everything, deactivate Pro and remove its folder `wp-content/plugins/image-ai-seo-pro` by FTP or in your hosting file manager instead of deleting it on the Plugins screen; WordPress then runs no uninstall routine.

= What happens if Image AI SEO and Image AI SEO Pro are both active? =

Only one of them runs. The other one pauses itself and shows a notice that tells you to deactivate and delete Image AI SEO Pro. Nothing breaks in the meantime.

= What happens to my data when I uninstall the plugin? =

Uninstalling removes the plugin's own settings, credits, consent record and the two custom database tables it created (across every site on a multisite network). It does not delete the optimization-status metadata already stored on your attachments; see the Uninstall section below for details.

== Screenshots ==

1. License tab: enter your API key and agree to the data-processing notice before anything is sent.
2. Settings: focus keyword, additional keywords, website description and the output language.
3. Preview dialog: review the suggested title, alt text, description and filename before they are applied.
4. Bulk optimization with progress display and a credit check before the run starts.
5. History: revert or restore any change, including the file rename.
6. Media Library column showing the optimization status of every image.

== Changelog ==

= 2.3.3 =
* Prepares the switch to the renamed plugin "Altimo – AI Image SEO", the name under which wordpress.org lists this plugin. Deleting this copy keeps your API key, settings, consent and history when Altimo is installed.
* While Altimo is active, this copy pauses itself instead of running twice.
* The notice of a paused copy appears only on the Plugins screen.

= 2.3.2 =
* The plugin header now names the author's WordPress.org profile as Author URI, separate from the plugin's own website. No functional changes.

= 2.3.1 =
* The data-processing notice no longer mentions the update check of the discontinued Pro version. Existing sites are asked to confirm the updated notice once; optimization pauses until then.
* Fix: the bulk optimization tab now shows "Optimizing image X of Y" below the progress bar; the bar used to hide it.
* Fix: the credit hint on the bulk optimization tab ("Optimizing N images will use N credits") now updates during and after a run, together with the credit badge.
* Tested with WordPress 7.1.

= 2.3.0 =
* Image AI SEO is now the only edition. Image AI SEO Pro is discontinued; this plugin has the same features.
* If Image AI SEO and Image AI SEO Pro are both active, only one of them runs and a notice says which one to keep, instead of a fatal error.
* Deleting one of the two plugins while the other one is still installed keeps the settings, API key, consent and history.

= 2.2.1 =
* Fix: the credit badge now updates together with the credit count after connecting a key.

= 2.2.0 =
* After activation the plugin opens the Welcome tab instead of the License tab. It does not redirect after a bulk or network-wide activation, through WP-CLI, or for users who cannot manage the plugin, and only once.
* On activation, an empty website description is prefilled from your site's tagline, and an empty focus keyword from the focus keyword your SEO plugin stores for a static front page. Fields that already contain text are never changed, and nothing is sent.
* New "Suggest with AI" button on the Welcome tab: the AI suggests a focus keyword, additional keywords and a website description from your site name, tagline, address, language and recent titles. Right after you validate your API key it fills the empty fields once on its own.
* The data-processing notice now lists the data sent for these suggestions. Existing sites are asked to confirm the updated notice once; optimization pauses until then. Sites that already have an API key get the one-time AI suggestion for their empty Welcome fields right after confirming.

= 2.1.1 =
* Corrected the data-processing notice: it now states how long the service keeps request data (anonymised after 90 days), names the AI gateway FlowModels, and lists every moment data is sent. Existing sites are asked to confirm the updated notice once; optimization pauses until then.
* Undoing a change in the history now resets the image to "Not optimized" when it is back in its original state, so the counters and the next bulk run include it again. Images left marked as optimized by an earlier undo are repaired once during the update.
* Redesigned preview dialog: the image next to full-width fields, a larger description field and aligned checkboxes.
* After a bulk run the image counts, the credit hint and the start button are refreshed; with nothing left the button shows "All images optimized".
* The plugin header shows the Image AI SEO mark as a crisp vector graphic.
* A bulk run stops with a clear message when consent is missing instead of skipping every image.
* The License tab no longer promises a fixed number of free credits; it shows your real balance.
* Admin notices appear only on relevant screens and can be dismissed.
* Security hardening: per-image permission checks, prefixed AJAX actions, stricter input handling, no direct file access.
* The Free build no longer contains any update-client code, and release archives can no longer contain hidden files.

= 2.1.0 =
* The plugin now talks to its own service at imageaiseo.com.
* Pro installations receive updates from imageaiseo.com.
* The purchase, website and privacy links point to imageaiseo.com.

= 2.0.0 =
* Full compatibility with WordPress 7.
* Safe image file renaming with automatic 301 redirects, so links and embeds keep working after a rename.
* Preview of suggested title, alt text, description and filename changes before anything is applied.
* Multisite support: per-site settings, credits and consent, with network-wide license management.
* A GDPR-compliant consent gate that blocks all outbound requests until the site owner explicitly agrees to the data transmission described below.

== External Services ==

This plugin relies on the Image AI SEO service at imageaiseo.com, operated by Creative Skyline Ltda., Avenida Washington Soares 55, 60811-341 Fortaleza, Brazil. The service generates the titles, alt texts, descriptions and filenames; without it, the plugin cannot optimize images. No data is sent before you grant consent in the plugin's settings.

What is sent, and when:

* Image optimization (a single image, a bulk run, automatic optimization of new uploads if you enable it, and "Regenerate" in the history): the image URL, your focus keyword, additional keywords, website description, the output language and your API key. The service downloads the image from this URL, reduces its size and passes it to the AI model for analysis.
* API key validation and the credit balance check: your API key, the website domain, the server IP address and the plugin version.
* AI suggestions for the Welcome settings (once automatically right after you validate your API key or give consent for an already saved key, and each time you click "Suggest with AI"): your API key, the site name, the site tagline, the website address, the WordPress language (locale), the output language, whether WooCommerce is active, and the titles of up to 20 recently published posts, pages and products.
* With every request, WordPress also sends your website address in the request header.

The AI analysis runs through FlowModels, an AI gateway operated by Creative Skyline Ltda., which forwards the image and the text data to the AI model vendor named in the privacy policy. This transfers the data to Brazil and leaves the EU into a third country under GDPR Art. 44 ff. The transfer is based on the European Commission's adequacy decision for Brazil, with Standard Contractual Clauses (SCC) as an additional safeguard.

The purpose of the processing is to generate SEO-optimized titles, alt texts, descriptions and filenames for your images, and to suggest a focus keyword, additional keywords and a website description for your site. The downloaded image is not stored. The service keeps a record of each image request (image URL, keywords, website description, language and the generated texts) and of your website (domain, server IP address, plugin version). After 90 days, the personal details in these records are anonymised; only counters such as the number of requests, the language and the outcome remain. The site data sent for AI suggestions is used only to generate the suggestions and is not stored beyond technical logs.

* Terms of service: https://imageaiseo.com/terms
* Privacy policy: https://imageaiseo.com/privacy

== Upgrade Notice ==

= 2.3.3 =
Prepares the switch to the renamed plugin "Altimo – AI Image SEO". Deleting this copy keeps your data when Altimo is installed.

= 2.3.2 =
Maintenance release without functional changes.

= 2.3.1 =
The data-processing notice was shortened (the update check of the discontinued Pro version is gone). Optimization pauses until you confirm the updated notice once on the License tab; your API key and settings are kept.

= 2.3.0 =
Image AI SEO Pro is discontinued. If you use it, install this plugin and read the FAQ entry for Pro users before you delete Image AI SEO Pro: versions older than 2.3.0 remove your settings, API key and history when deleted.

= 2.2.1 =
Fixes the credit badge in the plugin header, which could still say "No credits remaining!" next to the new balance after you connected your API key. No action needed.

= 2.2.0 =
New AI suggestions for the Welcome settings. The data-processing notice now lists the site data they send, so optimization pauses until you confirm the updated notice once on the License tab; your API key and settings are kept.

= 2.1.1 =
The data-processing notice was corrected (retention period, AI gateway, every moment data is sent). Optimization pauses until you confirm the updated notice once on the License tab; your API key and settings are kept.

== Uninstall ==

Uninstalling this plugin removes its settings (API key, credits, language, keywords, site description, consent record, the record of the one-time AI suggestion and database version) and drops its two custom database tables. On a multisite network, this runs for every site, plus the network-scoped license option.

While Image AI SEO Pro (the discontinued edition, which uses the same data) is still installed, deleting this plugin removes nothing. Image AI SEO Pro 2.3.0 does the same the other way round, older Pro versions do not (see the FAQ). The data is removed when the last of the two is deleted.

The plugin does not delete the `_image_ai_seo_optimized` and `_image_ai_seo_needs_attention` postmeta values already stored on your attachments. This is a deliberate choice, not an oversight: these values are part of your existing media library content, and WordPress' own convention is to leave a site's content untouched when a plugin is removed. If you reinstall the plugin later, this preserves the record of which images were already optimized.
