=== PackshotPhoto AI — Image SEO & Optimizer ===
Contributors: bartskol
Tags: image-seo, alt-text, image-optimizer, webp, avif
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automate WordPress image SEO with AI: generate ALT texts, convert to WebP/AVIF, and rename files.

== Description ==

= Supercharge your WordPress Image SEO and Loading Speed in One Click =

**PackshotPhoto AI** is a next-generation media optimization plugin that combines advanced artificial intelligence (Gemini 3 Flash Vision) with modern image conversion tools. It helps you automate Alt texts, captions, descriptions, and file naming while significantly reducing image sizes.

= Key Features =
*   **AI-Powered SEO Metadata:** Automatically analyzes images to generate highly optimized, context-aware Alt texts, captions, descriptions, and slugs in multiple languages (Polish, English, German, French, Spanish, and more).
*   **WebP & AVIF Conversion:** Convert standard JPEG/PNG/GIF files to next-gen formats (WebP and AVIF) to slash load times and save server space.
*   **Smart Image Resizing:** Automatically resize oversized uploads to a safe maximum resolution to prevent page bloating.
*   **Safe Physical Renaming:** Physical file renaming on the server using SEO-friendly slugs, with automated link updating throughout your site's posts.
*   **One-Click Restore:** Complete backup and restore system that lets you revert to original files, metadata versions, or file formats at any time.

== Third-Party Services ==

This plugin relies on external third-party services to deliver AI image analysis, license validation, telemetry, and credit processing. In accordance with the WordPress.org plugin guidelines, the terms, privacy policy, and service details are outlined below:

1. **PackshotPhoto AI Cloud API (Supabase)**
   * **Service URL / Endpoint:** https://duubkqjowabuevqudtbk.supabase.co
   * **Purpose:** Handles AI image analysis (SEO metadata generation), license validation checks, billing checkout sessions, and credit status synchronizations.
   * **Data Sent:** Image URLs, user email, site URL, and subscription license keys. Sent only when the user requests AI generation, validates a license key, or registers/purchases credits.
   * **Terms of Service:** https://supabase.com/terms
   * **Privacy Policy:** https://supabase.com/privacy

2. **PackshotPhotoAI API**
   * **Service URL / Endpoint:** https://api.promediamanager.com
   * **Purpose:** Handles subscription license validation and deactivation events.
   * **Data Sent:** License key, site URL, and current version. Sent when activating or deactivating a license key.
   * **Terms of Service:** https://packshotphoto.com/rodo.html
   * **Privacy Policy:** https://packshotphoto.com/polityka-prywatnosci.html

3. **Stripe**
   * **Service URL / Endpoint:** https://stripe.com
   * **Purpose:** Payment gateway handling credit purchases securely (all card information is processed directly by Stripe).
   * **Data Sent:** Billing and payment details. Sent only during manual checkout redirects.
   * **Terms of Service:** https://stripe.com/checkout/legal
   * **Privacy Policy:** https://stripe.com/privacy

== Installation ==

1.  Upload the `packshotphoto-ai` folder to your `/wp-content/plugins/` directory, or search for "PackshotPhoto AI" in your WordPress admin dashboard under **Plugins > Add New**.
2.  Activate the plugin through the **Plugins** screen in WordPress.
3.  Navigate to **Tools > PackshotPhoto AI** to configure your settings (including your connection or custom API keys).
4.  Visit your **Media Library** (List View) to start generating AI metadata and converting formats.

== Frequently Asked Questions ==

= Do I need an API key to use the AI features? =
By default, the plugin connects to our central proxy service. Upon connecting, you receive 10 free credits to test the AI capabilities. Alternatively, you can configure your own custom OpenAI-compatible endpoint and model API key under the Developer tab.

= Is it safe to rename images that are already used in posts? =
Yes, but we recommend using the "Safe Rename (Title & Slug Only)" option. If you perform a physical file rename, the plugin will attempt to update existing image links in your database. However, backing up your database before bulk operations is always a best practice.

= Where are the original image backups stored? =
Backups are safely stored in your `wp-content/uploads/packshotphoto-trash/` directory and are automatically cleaned up after 30 days.

== Screenshots ==

1. The main Media Library integration showing Alt, Caption, Description inline editing and AI actions.
2. The Credits & Billing dashboard with starter credit activation.
3. Settings page with Auto-Resize configurations and Site Context analyzer.
