=== Imagivo – AI Image SEO for WooCommerce ===
Contributors: josephimgseo
Tags: woocommerce, seo, alt text, image seo, product images
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
WC tested up to: 11.0.1
Stable tag: 0.9.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate AI-powered image SEO for WooCommerce product images, including alt text, image titles, descriptions, and tag suggestions.

== Description ==

Imagivo is a WooCommerce plugin that connects to the external ImgSEO service at
https://imgseo.io for server-side image SEO generation. It sends raw product image
bytes, the filename and MIME type, bearer API authentication, and bounded product
context where available. One manual, bulk, or explicitly enabled automatic request
returns Alt Text, an SEO Image Title, an Attachment Image Description, and Tag
Suggestions. Imagivo can safely save
eligible empty attachment Alt, title, and description fields; tags remain
non-destructive suggestions. It does not generate or modify WooCommerce
product descriptions, and it does not embed
EXIF or XMP metadata in image files.

**This is an early release (0.9.0).** It currently provides:

* A settings page to store your ImgSEO API key, with a "Test connection" button.
* A "Generate Image SEO (Imagivo)" button on the product editor screen, which
  is available only in the classic WooCommerce product editor. It generates
  one reusable bundle for that product's featured image: one image,
  one click, one API call, and at most one credit. It never overwrites existing
  attachment Alt, title, or description content.
* A "Bulk Image SEO" page (Imagivo → Bulk Image SEO) that scans featured,
  gallery, and variation images with empty alt text in bounded background
  pages. It shows an exact deduplicated preview and maximum credit exposure,
  then requires explicit confirmation before bounded generation begins.
  Published, draft, pending, and private products are included.
* Optional Automatic Image SEO for newly uploaded featured, gallery, and
  variation images. It is off by default, preserves existing attachment fields,
  keeps tags as suggestions only, and uses bounded delayed linkage/API retries.

It writes an attachment title only when the title is literally empty and writes
the attachment description only when empty. It does **not** assign tags, write
captions or filenames, change WooCommerce product descriptions, Schema, or
sitemaps. Bulk runs provide Pause/Resume but no
Cancel control.

= External service disclosure =

Imagivo connects to the ImgSEO API (`https://imgseo.io`), an external paid
service operated by ImgSEO, to verify the saved API key and perform server-side
image SEO generation. External generation may consume ImgSEO service credits.
The plugin uses these service endpoints:

* `https://imgseo.io/api/v1/ping` for API-key validation/connectivity and optional advisory credit visibility.
* `https://imgseo.io/api/v1/image-seo` for AI image SEO generation.

Generation requests include an opaque, non-personal idempotency identifier so
bounded retries of one logical image operation cannot start duplicate AI work.

These actions trigger a request to that API:

* The "Test connection" button sends an authenticated ping request, including
  the saved API key as bearer authentication, to verify
  connectivity and API-key validity. It may return an optional, point-in-time
  advisory credit summary, but that summary does not authorize or prohibit
  generation. Actual credit availability is enforced by the generation
  endpoint. Ping sends no image, generates no SEO text, and uses no credits.
* When a Bulk Image SEO scan reaches its ready/review state, the Bulk page
  sends an authenticated ping request using the saved API key solely to retrieve
  optional, point-in-time advisory credit information. It sends no image bytes,
  generates no SEO text, and uses no generation credits. The returned balance
  is advisory only; actual credit availability is enforced by the generation
  endpoint.
* The "Generate Image SEO (Imagivo)" button sends the bytes of the selected
  product's featured image, its filename and MIME type, bearer API
  authentication, and bounded WooCommerce facts such as the product name,
  type, selected category, visible attributes, and image role, to generate one
  Image SEO Bundle for that image.
* The "Bulk Image SEO" page does the same thing, once per selected unique product image with
  empty alt text. Catalog discovery is paginated in the background and image
  generation jobs are scheduled through a bounded, incrementally refilled
  window rather than inserting the entire catalog at once. Variation images
  may include their explicit variation attributes. Images shared by unrelated
  products omit product-specific facts and are marked as ambiguous.
* When Automatic Image SEO is explicitly enabled, a newly uploaded image may
  be sent after it becomes linked as a WooCommerce featured, gallery, or
  variation image. One bundle may consume one credit; existing Alt, title, and
  description content is preserved and Tag Suggestions are not assigned.
Generated bundle text may be stored in WordPress attachment Alt metadata,
attachment title, or attachment description. Tag suggestions are displayed but
not assigned to any taxonomy. ImgSEO does not generate or modify WooCommerce
product descriptions. ImgSEO does not replace image files or
embed EXIF/XMP metadata.

Use of the ImgSEO API requires an ImgSEO account and is subject to the
ImgSEO Terms of Service and Privacy Policy:

* Terms of Service: https://imgseo.io/terms
* Privacy Policy: https://imgseo.io/privacy

== Installation ==

1. Install Imagivo from Plugins → Add New, or upload the plugin ZIP through
   Plugins → Add New → Upload Plugin.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. WooCommerce must be installed and active — Imagivo will show an admin
   notice and stay inactive otherwise.
4. Go to the new "Imagivo" menu, enter your ImgSEO API key, save, then click
   "Test Connection" to confirm it works.
5. In the classic WooCommerce product editor, open a product with a
   featured image, and use the
   "Generate Image SEO (Imagivo)" button in the Imagivo meta box (sidebar).

== Frequently Asked Questions ==

= Does this work without WooCommerce? =

No. Imagivo is built around WooCommerce product images specifically and will
not activate its features without WooCommerce active.

= Where do I get an API key? =

From your account at https://imgseo.io.

= Will this overwrite alt text I already wrote? =

No. Existing attachment Alt, title, and description content is preserved.
Automatic, Bulk, and manual Image SEO Bundle writes are write-if-empty. A bundle
may still be generated when at least one writable attachment field is empty,
but existing values are not replaced and Tag Suggestions are never assigned.

= Does generating alt text use one of my credits? =

A generation action may consume one credit when the ImgSEO API completes a
successful real-AI generation. One successfully AI-processed image costs one
credit and returns the whole bundle; there is no additional charge per field.
This applies to a manual Image SEO Bundle, confirmed Bulk, and Automatic Image SEO.
Scan/Preview and the "Test
connection" button use zero generation credits. Existing content and other
local preflight skips make no generation request and consume zero credits.
Invalid-key, out-of-credits, and degraded results are not charged. After an
ambiguous transport failure, the plugin cannot prove whether the backend
completed a credit-bearing generation before the connection failed.

Temporary ImgSEO API rate limits are also not charged. Manual buttons show a
temporary retry message; background bulk/automatic jobs reschedule the affected
image after a bounded delay instead of retrying in a tight loop.

== Changelog ==

= 0.9.0 =
* Renamed the WordPress plugin identity to Imagivo while retaining ImgSEO as the external processing service.
* Updated the WordPress text domain to `imagivo` without changing stored settings, background hooks, API contracts, or other compatibility identifiers.
* Scoped operational dependency and automatic-processing notices to relevant admin screens.

= 0.8.0 =
* Expanded Manual, Bulk, and opt-in Automatic Image SEO Bundles while preserving existing merchant attachment content.
* Added scalable selectable Bulk processing, bounded Action Scheduler scheduling, Pause/Resume, and fail-closed behavior when background scheduling is unavailable.
* Hardened generation with retry-safe idempotency, POST-only mutations, authoritative out-of-credits handling, and advisory-only ping balances.
* Added explicit API-key disconnect, complete plugin-state uninstall cleanup, and selective background-job cleanup without removing generated merchant content.
* Declared WooCommerce HPOS compatibility and clarified that manual generation supports the classic product editor only; Bulk and Automatic workflows remain editor-independent.

= 0.7.1 =
* Added retry-safe idempotency identities for Manual, Bulk, and Auto image generation so the backend can reject duplicate logical operations without another AI call or credit.
* Added safe handling for generation operations that are still pending or already finalized.

= 0.7.0 =
* Removed WooCommerce Product Long Description generation to focus the plugin exclusively on Image SEO.
* Existing WooCommerce product descriptions remain merchant content and are never modified or deleted by this removal.
* The Image SEO Bundle remains Alt Text, SEO Image Title, Attachment Image Description, and non-destructive Tag Suggestions from one image request and at most one credit.

= 0.6.0 =
* Added one-request Image SEO Bundles for manual and bulk image generation: Alt Text, SEO Image Title, Image Description, and non-destructive Tag Suggestions.
* Empty attachment Alt, title, and description fields can be written from the same one-credit result while existing merchant content is preserved.
* Auto Alt remained explicitly opt-in and Alt-only; Product Description was a separate action in this release.

= 0.5.0 =
* Bulk Image SEO now scans first, shows a paginated unique-image preview, persists the merchant's selection, and requires explicit confirmation before generation.
* Bulk preview includes published, draft, pending, and private products; scanning consumes zero ImgSEO generation credits.
* The preview shows maximum credit exposure, current available credits when reachable, and shared cross-product image conflicts.
* Added separate WooCommerce long-description generation with write-if-empty protection.

= 0.4.0 =
* Added default-off automatic alt text for newly uploaded product-linked images with bounded background checks and retries.

= 0.3.0 =
* Added: "Bulk Alt Text" admin page (ImgSEO → Bulk Alt Text). Finds product
  images (featured, gallery, and variation) with empty alt text, and generates
  it for each one via an independent Action Scheduler job. Catalog discovery is paginated
  and generation scheduling uses a bounded refill window. Progress display
  with Pause/Resume; automatically pauses on an out-of-credits or invalid-key
  response so it doesn't fail hundreds of jobs in a row.

= 0.2.0 =
* Added: "Generate Alt Text (ImgSEO)" button on the product editor, for the
  product's featured image. Respects existing alt text (never overwrites).

= 0.1.0 =
* Initial scaffolding release: plugin shell, WooCommerce check, settings
  page with API key storage, and a connection test. No bulk processing yet.

== Upgrade Notice ==

= 0.9.0 =
Renames the WordPress plugin to Imagivo and updates its translation domain while preserving ImgSEO service integration and existing operational identifiers.

= 0.8.0 =
Adds safer selectable Bulk and Automatic Image SEO workflows, API-key disconnect and cleanup, request hardening, and HPOS compatibility without overwriting merchant content.

= 0.7.1 =
Adds retry-safe generation identities without changing the Image SEO Bundle or credit model.

= 0.7.0 =
Removes Product Long Description generation while preserving all existing product content and the Image SEO Bundle.

= 0.6.0 =
Adds one-credit Image SEO Bundles while preserving existing attachment content and the existing Auto Alt behavior.

= 0.3.0 =
Adds bulk alt-text generation for all product images with empty alt text,
processed in the background via Action Scheduler.

= 0.2.0 =
Adds the first real feature: single-image alt text generation from the
product editor.
