=== Perso image insights ===
Contributors: yaserchehelamirani
Tags: image, alt-text, accessibility, seo, ai
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
Donate link: https://buymeacoffee.com/yaseramirani
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI image metadata generator with SEO Health Dashboard. Context-aware AI, WooCommerce support, privacy-first with Cloudflare.

== Description ==

**The Problem:** WordPress has over 400 plugins that generate alt text. Most of them produce generic, robotic descriptions like "a photo of a person" that don't help your SEO, don't improve accessibility, and don't match your content.

**The Solution:** PERSO IMAGE Insights goes far beyond basic alt text generation. It analyzes your actual posts and products to understand context, generates field-specific metadata (not one-size-fits-all), monitors your entire image library health, and protects your server with smart batch processing.

**What You Get That Others Don't:**

**Image SEO Health Score (0-100)** — See the exact SEO health of all your images at a glance. Get your score, identify oversized images (>500KB), detect broken images, and track your improvement over time. No other alt-text plugin gives you this visibility.

**Context-Aware AI Generation** — Unlike competitors that describe images in isolation, our AI reads the post title, content, and category where the image appears. A photo of a coffee cup on a food blog gets "Freshly brewed Ethiopian coffee with latte art" instead of just "a cup of coffee."

**WooCommerce Product Intelligence** — For product images, the AI uses your product name, category, and tags to generate compelling, sales-oriented metadata that helps convert visitors. A shoe image becomes "Nike Air Max 90 running shoes - breathable mesh upper with responsive cushioning" instead of "a pair of shoes."

**Smart Batch Processing** — Process images in small 10-image batches with automatic pauses. Protect your server from overload and avoid Cloudflare API rate limits. Other plugins try to process everything at once and crash your site.

**Field-Specific AI Prompts** — Each field (Alt Text, Title, Caption, Description) gets its own optimized prompt. Alt text is concise for screen readers. Titles are catchy for SEO. Descriptions are detailed for storytelling. Captions are engaging for readers. No more copy-pasting the same text everywhere.

**Privacy-First by Default** — Uses Cloudflare Workers AI, which does not store or train on your images. Your data stays between you and Cloudflare. No OpenAI, no Anthropic, no third-party data sharing unless you explicitly configure it.

**Zero Spam Policy** — We don't stuff keywords, we don't generate irrelevant hashtags, and we don't create robotic "image of..." descriptions. Every piece of metadata is written to be useful for real humans first, search engines second.

= Features =

* AI vision-based image analysis using Cloudflare Workers AI
* Generate metadata for Alt Text, Title, Caption, and Description
* **Image SEO Health Score** - Overall SEO score for all images (0-100)
* **Image Health Warnings** - Detect oversized images (>500KB) and broken images
* **Smart Context-Aware Generation** - Uses post/product context for better metadata
* Choose which fields to auto-generate
* Skip existing values option
* Process only empty fields
* Manual generation from Media Library
* Bulk generation support (10 images per batch)
* WooCommerce featured image support
* Custom AI prompt for site-specific context
* Clean, separate prompts for each field
* Translation-ready
* Activity logging
* WordPress coding standards compliant

= Accessibility First =

Alt text is critical for screen reader users. This plugin prioritizes alt text generation with:
* Concise, descriptive language
* No "image of" prefixes
* Natural keyword usage
* Optional decorative image handling

= SEO Benefits =

Proper image metadata helps your content rank in Google Images and improves overall page SEO without spam tactics.

= WooCommerce Support =

Generate compelling metadata for your product images using product name, category, and context.

== Installation ==

1. Upload the plugin files to `/wp-content/plugins/perso-image-insights`
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to **Settings → PERSO IMAGE Insights** to configure
4. Select which fields to generate and your preferences
5. Start generating from the Media Library or use bulk tools

== Frequently Asked Questions ==

= How do I set up the Cloudflare API? =

**Step 1: Create API Token**
1. Go to: https://dash.cloudflare.com/profile/api-tokens
2. Click "Create Token"
3. Select "Workers AI"
4. Click "Use template"

**Step 2: Configure Permissions**
Set these exact permissions:
- Account: Workers AI
- Permission: Read

**Step 3: Account Resources**
- Select "All accounts"

**Step 4: Generate Token**
- Click "Continue to summary"
- Click "Create token"
- Copy and save the token (shown only once!)

**Step 5: Find Your Account ID**
https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/

**Step 6: Enter in Plugin**
1. Go to Settings → Perso Image Insights
2. Paste your Account ID
3. Paste your API Token
4. Save and test

= Do I need an API key? =

Yes, you need a Cloudflare API token with Workers AI permissions. The plugin uses Cloudflare's AI vision service for image analysis.

= Will this overwrite my existing metadata? =

Only if you choose to. The plugin has options to skip existing values or only process empty fields.

= Is this good for accessibility? =

Yes. The plugin follows WCAG guidelines for alt text and prioritizes accessibility in its generation logic.

= Does it work with WooCommerce? =

Yes. The plugin supports featured product images and uses product context for better metadata generation.

= Can I customize the AI prompts? =

Yes! Go to Settings → PERSO IMAGE Insights and add your custom prompt context to guide the AI based on your site's topic.

= Why did you replace the hashtag approach? =

The previous approach (generating hashtags in the Description field) violated WordPress coding standards and SEO guidelines. This plugin generates proper, human-readable metadata for each field's intended purpose.

== Screenshots ==

1. Clean settings page with field selection
2. Dashboard with image statistics
3. Bulk generation interface with progress tracking
4. Media Library integration with generate button
5. WooCommerce product image support
6. Generation logs and activity history
7. Image SEO Health Score overview

== Changelog ==

= 1.0.0 =
* Initial release
* AI vision-based metadata generation using Cloudflare Workers AI
* Support for Alt Text, Title, Caption, Description
* Custom AI prompt for site-specific context
* WooCommerce featured image support
* Manual and bulk generation
* Settings page with granular field selection
* Activity logging
* WordPress coding standards compliant

== Upgrade Notice ==

= 1.0.0 =
Initial release. Install to automatically generate image metadata using AI.

== Donate ==

**Support This Plugin**

Perso Image Insights is completely free and open source. If you find this plugin helpful and want to support its continued development, please consider making a donation:

**Buy Me a Coffee:** https://buymeacoffee.com/yaseramirani

Your donation helps:
* Maintain and improve the plugin
* Add new features
* Provide support
* Keep the plugin free for everyone

Thank you for your support!

== Credits ==

**Developed by:** Yaser Amirani
* Website: https://github.com/yaserchehelamirani
* Support: https://github.com/yaserchehelamirani/perso-image-insights/issues
* GitHub: https://github.com/yaserchehelamirani

== External Services ==

This plugin connects to Cloudflare Workers AI API for image analysis and metadata generation.

**What the service is and what it is used for:**
Cloudflare Workers AI provides vision-based image analysis capabilities. The plugin sends your images to Cloudflare's AI service to generate alt text, titles, captions, and descriptions.

**What data is sent and when:**
When you initiate metadata generation for an image, the plugin sends the image file (converted to base64) to Cloudflare's API along with a custom prompt describing what metadata to generate. This happens only when you explicitly click "Generate AI Metadata" or use bulk generation.

**Links to service terms:**
* Terms of Service: https://www.cloudflare.com/terms/
* Privacy Policy: https://www.cloudflare.com/privacypolicy/
* Cloudflare AI Gateway Documentation: https://developers.cloudflare.com/ai-gateway/

== Privacy Notice ==

When using AI providers, image data is sent to external services for analysis. No data is stored on our servers. See provider privacy policies for details.
