=== Emilia AI Studio for WooCommerce ===
Contributors: emiliadigital
Tags: ai, woocommerce, product images, background removal, image enhancement
Requires at least: 5.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn ordinary product photos into studio-quality shots with AI. Replace backgrounds, stage scenes, and enhance WooCommerce images in one click.

== Description ==

Stop losing sales to cluttered backgrounds, inconsistent lighting, and hours of manual editing. **Emilia AI Studio for WooCommerce** brings professional-grade AI image generation directly into your WordPress Media Library — so every product photo in your store looks like it came from a pro studio.

Connect your store to the Emilia AI Studio platform, pick a style, and let the AI do the rest. Your original files stay safe, attachment IDs stay the same, and your products instantly look the way they deserve to look.

**Built for real WooCommerce stores**

Whether you sell fashion, food, jewelry, furniture, or cosmetics, Emilia gives you styles tuned to your category — not a one-size-fits-all filter.

**Key Features**

*   **One-click generation** straight from the Media Library list or grid view.
*   **Product page tools** — three buttons right under the Product image: *Enhance with Emilia AI* (generate, retry, zoom/reposition, replace in place), *Add More Styles*, and *Create Lookbook*.
*   **Add More Styles** — pick a base image (main image or any gallery image), generate a set of styled shots with a live credit estimate, review them in a grid, and add your favorites to the product gallery.
*   **Create Lookbook** — re-frame one shot into coherent extra angles and close-ups (a focus like "the clasp" plus a camera angle per shot, with an AI Suggest art director). Same scene, same lighting — the camera moves.
*   **Product variation images** — re-render each variation from its own photo (correct colorway) in the style you choose, and set it as that variation's image in one batch.
*   **Transparent background (PNG)** — clean product cutouts on solid packshot styles, as a saved default or per image.
*   **20+ AI styles** including pure white, pure black, custom colors, and themed scenes.
*   **Category-specific modes** for Product, Food, Jewelry, Clothing, Furniture, and Cosmetics — each with its own smart options (angle, shadow, surface, styling, composition).
*   **AI presenters (virtual models)** to showcase apparel, accessories, and cosmetics on-body without a photoshoot.
*   **Full control over output** — aspect ratios (1:1, 4:5, 9:16, 16:9, 3:4, 3:2, 4:3, 21:9) and resolutions up to 4K.
*   **Quick Generate or Customize** — use your saved defaults or open the modal for per-image fine-tuning.
*   **Safe by default** — every replacement creates a timestamped backup of the original file.
*   **Same attachment ID** — no duplicates, no broken product links, no re-assigning featured images.
*   **Bulk actions** from the Media Library for processing catalogs at scale.
*   **Live sync** with the Emilia platform pulls your latest styles and presenters automatically.
*   **Transparent credits** — resolution-based costs (3–6 credits) shown before you generate.

**Who it's for**

WooCommerce store owners, catalog managers, and content teams who need consistent, high-converting product imagery without hiring a photographer or learning Photoshop.

**How it works**

1.  Install the plugin and enter your Emilia AI Studio API key.
2.  Pick default styles, presenters, aspect ratio, and resolution under `WooCommerce > Emilia AI Studio`.
3.  Go to the Media Library, click **Generate** on any product image, and preview the result — or open any product and use **Enhance**, **Add More Styles**, or **Create Lookbook** right under the product image.
4.  Hit **Replace Original** (or add your favorite shots to the product gallery) — your product pages update across the store.

Requires a free account at [Emilia AI Studio](https://ai.emilia.digital/) to obtain an API key. The plugin is free; image generation uses platform credits.

== Installation ==

1.  **From your WordPress dashboard:**
    *   Navigate to `Plugins` > `Add New`.
    *   Search for "Emilia AI Studio for WooCommerce".
    *   Click `Install Now` and then `Activate`.

2.  **Manual upload:**
    *   Download the plugin ZIP file from WordPress.org.
    *   Navigate to `Plugins` > `Add New` and click `Upload Plugin`.
    *   Choose the downloaded file and click `Install Now`, then `Activate`.

3.  **After activation:**
    *   Go to `WooCommerce` > `Emilia AI Studio`.
    *   Enter your API key from your Emilia AI Studio account.
    *   Save settings and test the connection. You're all set!

== Frequently Asked Questions ==

= What do I need to use this plugin? =

You need a WordPress site with WooCommerce installed and an active account with Emilia AI Studio to obtain an API key.

= Is the plugin or the service free? =

The plugin itself is free to download and install. However, the AI image generation service requires an active subscription or credits from Emilia AI Studio, as processing images consumes resources.

= What product categories are supported? =

Emilia ships with styles tuned for general Product shots, Food, Jewelry, Clothing, Furniture, and Cosmetics. Each category exposes relevant options — shadow, angle, surface, styling, composition — so you get results that look right for what you sell.

= Can I put my clothing or cosmetics on a model without a photoshoot? =

Yes. Emilia supports AI presenters (virtual models) that can be selected as a default or per-image to showcase apparel, accessories, and cosmetics on-body.

= What resolutions and aspect ratios are supported? =

Output aspect ratios include 1:1, 4:5, 9:16, 16:9, 3:4, 3:2, 4:3, and 21:9. Resolutions range from 1K up to 4K. Credit cost per generation (3-6 credits) is shown in the settings before you generate.

= Does this plugin store my images on its servers? =

No. Your images are sent securely to the Emilia AI Studio API for processing and are not stored. The generated image is sent back to your server and the temporary data is discarded.

= What happens if I replace an image by mistake? =

When you replace an image, the plugin automatically creates a backup of the original file on your server, adding a `.backup-[timestamp]` suffix. You can restore it manually via FTP or your hosting file manager if needed.

= Does replacing an image create a duplicate in my media library? =

No. The plugin overwrites the existing image file, keeping the exact same attachment ID. This means you won't have duplicates, and your products will automatically show the new image without any extra work.

= Can I process many images at once? =

Yes. Bulk actions are available from the Media Library so you can enhance an entire product catalog without generating images one by one.

= What is the difference between "Add More Styles" and "Create Lookbook"? =

Add More Styles generates a set of different looks (pure white, lifestyle scene, with a model, and so on) from your base image — great for filling a product gallery with variety. Create Lookbook keeps the exact scene and lighting of one shot and re-frames the camera: extra angles, macro close-ups on details like a clasp or a pocket. Use both — they feed the same gallery.

= How do product variations get images? =

After generating a style set on a variable product, open the "Apply this look to your variations" section: each selected variation is re-rendered from its own photo (so a red shirt stays red) and the result is set as that variation's image automatically.

== Screenshots ==

1.  The main settings page under `WooCommerce > Emilia AI Studio`, showing API configuration, style grid, presenters, and output defaults.
2.  The "Emilia AI Studio" column in the Media Library list view, with the `Generate` button.
3.  The generation actions (`Replace`, `Preview`) appearing in the list view after a successful generation.
4.  The AI generation tools integrated into the attachment details modal/sidebar.
5.  The customization modal with style, helpers, presenter, aspect ratio, and resolution controls.
6.  The AI-generated image preview with "Replace Original" and "Download" options.
7.  The product edit screen with the Enhance, Add More Styles, and Create Lookbook buttons under the product image.
8.  The Lookbook modal: base image picker, focus + angle shot rows with AI Suggest, and the review grid.

== Changelog ==

= 1.1.0 =
* New: "Enhance with Emilia AI" button under the Product image on the product edit screen - generate, retry, zoom/reposition the result, and replace the product image without leaving the page.
* New: "Add More Styles" on the product edit screen - pick a base image (main image or any gallery image), generate a set of styled shots (one-click auto set or hand-picked styles, live credit estimate), review them in a grid, and add the ones you like to the product gallery as new images (saved when you Update the product).
* New: "Create Lookbook" on the product edit screen - re-frame a base shot into coherent extra angles and close-ups (focus + camera angle per shot, with AI Suggest), then add the results to the product gallery. Same scene, same lighting - the camera moves.
* New: Apply a style to product variations - each variation is re-rendered from its own image (correct colorway) and set as that variation's image.
* New: Transparent background (PNG) option for solid packshot styles, in both the settings defaults and the customization modal.
* New: All the latest category style options (jewelry, clothing, furniture, cosmetics) are now accepted during generation.
* Improved: Quick Generate and bulk actions now respect your saved resolution, presenter, and category defaults.
* Improved: Replacing an image with a different format (e.g. a transparent PNG over a JPEG) now updates the file extension and mime type correctly.

= 1.0.2 =
* Removed: 512px resolution option (low-resolution outputs were rarely used and added noise to the settings).
* Updated: Compatibility tested up to WordPress 7.0 and WooCommerce 10.8.

= 1.0.1 =
* Fixed: API key validation pointed at the local site instead of the Emilia AI Studio platform, causing every key to be reported as invalid.

= 1.0.0 =
* Initial Release.
