=== Cyphex Image Hunter ===
Contributors: hamaza7867
Tags: ai, images, pexels, pixabay, dall-e
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.17
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Find, generate, and insert AI-optimized images into your posts using Pexels, Pixabay, DALL-E 3, and Flux.

== Short Description ==

Automatically finds and inserts AI-generated or stock images directly into your WordPress media library using Pexels, Pixabay, and cutting-edge generative AI models like DALL-E 3 and Flux.

== Description ==

Stop wasting hours hunting for the perfect stock photo, resizing it in Photoshop, and manually typing Alt text. **Cyphex Image Hunter** is the all-in-one AI command center for your WordPress Media Library.

### 🚀 The Ultimate Time-Saver for Content Creators
Whether you're a blogger, developer, or agency, this plugin eliminates the manual media workflow. In one single click, you can find high-quality stock photos or generate custom AI images, optimize them for speed, and write perfect SEO metadata—without ever leaving your WordPress dashboard.

### 🧠 Smart Image Sourcing & AI Generation
Don't settle for generic results. Our "Smart Search" uses Groq AI (Llama 3.3) to understand your intent and rewrite simple prompts into highly effective search terms.
*   **Universal Search:** Pull millions of royalty-free images from Pexels and Pixabay instantly.
*   **Next-Gen AI Generation:** Create unique visuals using DALL-E 3, Flux 1.1, and Stable Diffusion 3.
*   **AI Refinement:** Need a change? Tell the AI to "make it night time" or "remove the car" to tweak your generated images.

### ⚡ Automated Optimization Pipeline
Speed matters. Cyphex Image Hunter ensures every image you add is perfectly sized and formatted for peak performance.
*   **Exact Resizing:** Specify your target dimensions; the plugin auto-scales and crops for you.
*   **Instant WebP Conversion:** Boost your Core Web Vitals by automatically converting images to ultra-fast WebP format.
*   **Smart Compression:** Set your maximum file size (KB) and let the plugin handle the compression on the fly.

### 🏷️ AI-Powered SEO Metadata
Search engines love well-documented images. Our AI-SEO engine reads the context of your image to generate:
*   **Contextual Titles:** Descriptive, keyword-rich titles.
*   **Optimized Alt Text:** Perfect for accessibility and Google Image search.
*   **Smart Captions:** Engaging captions that keep users on your page.
*   **Auto-Credit:** Automatically attribute photographers from Pexels/Pixabay with clickable links.

== Video ==

Check out our quick demo video to see Cyphex Image Hunter in action:

[INSERT_YOUTUBE_OR_VIMEO_URL_HERE]


== Key Features ==

### 🌟 Smart Sourcing & Creation
*   **Universal Media Tab:** A seamless "Image Search" tab directly inside your "Add Media" modal.
*   **Groq AI Optimization:** High-speed prompt engineering for better image results.
*   **Multi-Model AI Support:** Choose between DALL-E 3, Flux, or Stable Diffusion.

### ⚙️ Professional Workflow
*   **One-Click Sideload:** Automatically downloads external images to your local server.
*   **Batch Resizing:** Ensures all your featured images match your theme's dimensions.
*   **Settings Link:** Quick access from the WordPress Plugins page.

== Premium Roadmap ==

We are building the future of automated media management. Soon, **Cyphex Pro** will include:
*   **Bulk Legacy Cleanup:** Optimize your entire existing Media Library in one click.
*   **Advanced AI-SEO Engine:** Deeper contextual analysis for hyper-targeted SEO.
*   **Next-Gen AVIF Format:** Superior compression beyond WebP.
*   **Auto-Pilot Automation:** Automatically find and add images to your drafts based on content.
*   **Performance Analytics:** See how your optimized images improve site speed.


== External services ==

This plugin relies on the following third-party services to fetch images and process AI metadata. Each service provides functionality of substance that cannot be performed locally:

1. Groq AI (api.groq.com): Used to optimize search prompts and generate SEO metadata. 
   - Data sent: User-provided search queries and image context.
   - Privacy Policy: https://groq.com/privacy-policy/
2. Pexels (api.pexels.com): Used to fetch high-quality stock images.
   - Data sent: Search keywords.
   - Privacy Policy: https://www.pexels.com/privacy-policy/
3. Pixabay (pixabay.com): Used to fetch royalty-free stock images.
   - Data sent: Search keywords.
   - Privacy Policy: https://pixabay.com/service/privacy/
4. Puter.js (js.puter.com): Used to generate images via models like DALL-E 3 and Flux.
   - Data sent: Image generation prompts.
   - Terms of Service: https://puter.com/terms
   - Privacy Policy: https://puter.com/privacy

== Installation ==

1. Download the **cyphex-image-hunter.zip** file.
2. Log in to your WordPress Dashboard and navigate to **Plugins > Add New**.
3. Click **Upload Plugin**, choose the zip file, and click **Install Now**.
4. **Activate** the plugin.

=== Configuration ===

1. Go to **Settings > Cyphex Image Hunter**.
2. Enter your API keys for Groq, Pexels, and Pixabay. 
3. Click **Save API Keys**.

See the **Screenshots** tab for a visual step-by-step guide on obtaining your API keys and using the plugin.

== Frequently Asked Questions ==

= Error: Puter.js not loaded =
Ensure you have an active internet connection. Puter.js is loaded from a CDN. Check if an ad-blocker is blocking `js.puter.com`.

= Generation Failed =
DALL-E 3 requires credits on the Puter platform. If you run out, switch the Source to **Flux 1.1** or **Stable Diffusion 3**, which are often free or use fewer credits.

= Images look like cartoons =
Ensure **AI Optimize** is CHECKED. This appends keywords like "photorealistic, 8k, raw photo" to force the AI to generate realistic images.

= Upload failed =
Check your server's `upload_max_filesize` in php.ini or ensure your WordPress user has permission to upload files.

== Screenshots ==

1. **Quick Setup Guide** - The easy-to-follow setup guide in your settings.
2. **Advanced Usage** - How to hunt and generate images.
3. **Groq Setup (Step 1)** - Signing up for your free Groq AI key.
4. **Groq Setup (Step 2)** - Creating your API key.
5. **Pixabay Setup** - Finding your Pixabay key in their documentation.

== Changelog ==

= 1.0.18 =
* New: Added support for Flux 1.1 Ultra.
* Fix: Addressed potential conflict with lazy-loading scripts.

= 1.0.17 =
* Enhancement: Advanced WordPress Coding Standards (WPCS) compliance across all PHP, JS, and CSS files.
* Tweak: Converted all indentations to Tabs and normalized spacing inside parentheses and after control structures.
* Security: Hardened permission checks and nonce verification in all AJAX endpoints.

= 1.0.16 =
* Fix: Added missing translator comments for I18n placeholders to pass WordPress Plugin Check (WPC).
* Tweak: Replaced Backbone template tags with standard WordPress template syntax to avoid ASP-style tag warnings.

= 1.0.15 =

= 1.0.13 =
* Tweak: Moved documentation images to the official Screenshots section for better visibility and standard compliance.

= 1.0.12 =
* Tweak: Completely restructured readme.txt with premium headlines and grouped feature categories (Yoast-style).

= 1.0.11 =
* Tweak: Removed Pro features section and embedded configuration screenshots directly into documentation.

= 1.0.10 =
* Tweak: Converted Pro features comparison into a clean bulleted list because WordPress.org strips table formatting.

= 1.0.9 =
* Tweak: Converted Pro features table to HTML format for better rendering on WordPress.org.

= 1.0.8 =
* Feature: Added an "Auto-Credit" checkbox directly to the Image Search UI for easier toggling.

= 1.0.7 =
* Tweak: Reformatted Auto-Credit text to match official stock photo standards and link to user profiles.

= 1.0.6 =
* Update: Added comparison table for upcoming Pro and Ultra Pro features.

= 1.0.5 =
* Tweak: Added a "Settings" link directly on the WordPress Plugins page for easier access.

= 1.0.4 =
* Feature: Added new "Auto-Credit Photographer" setting to automatically append photographer attribution to image captions for Pexels and Pixabay.

= 1.0.3 =
* Security hardening: Added strict capability checks to all AJAX handlers.
* Updated documentation and optimized compliance with the WordPress Plugin Directory guidelines.
* Renamed from AI Cyphex Image Hunter to Cyphex Image Hunter.
* Fixed broken documentation URLs in readme.txt.
* Corrected contributor list to match WordPress.org username (hamaza7867).

= 1.0.2 =
* Added comprehensive "How to Use" guide directly in Settings page.
* Added Quick Setup links for API keys.

= 1.0.1 =
* Fixed disabled button state and added data persistence.
* Initial Release.

== Upgrade Notice ==

= 1.0.3 =
This version includes critical security improvements and full compliance with WordPress repository guidelines. Upgrading is highly recommended.