AIImageGenerator.Optimizely 1.0.2

dotnet add package AIImageGenerator.Optimizely --version 1.0.2
                    
NuGet\Install-Package AIImageGenerator.Optimizely -Version 1.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AIImageGenerator.Optimizely" Version="1.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AIImageGenerator.Optimizely" Version="1.0.2" />
                    
Directory.Packages.props
<PackageReference Include="AIImageGenerator.Optimizely" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add AIImageGenerator.Optimizely --version 1.0.2
                    
#r "nuget: AIImageGenerator.Optimizely, 1.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package AIImageGenerator.Optimizely@1.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=AIImageGenerator.Optimizely&version=1.0.2
                    
Install as a Cake Addin
#tool nuget:?package=AIImageGenerator.Optimizely&version=1.0.2
                    
Install as a Cake Tool

AI Image Generator for Optimizely Commerce 14

A powerful extension that brings AI-powered image generation directly into your Optimizely Commerce 14 product editing experience.

Features

  • AI-Powered Image Generation - Generate professional product images using AI, based in you current product image, product name and description
  • 🚀 Easy Installation - Simple NuGet package installation
  • 📱 Modern UI - Beautiful, responsive interface integrated into Commerce edit mode

Requirements

  • Optimizely Commerce 14.x
  • Optimizely CMS 12.x
  • .NET 6.0 or higher
  • Active AI Image Generation API subscription

Installation

Step 1: Install NuGet Package

dotnet add package AIImageGenerator.Optimizely

Or via Package Manager Console:

Install-Package AIImageGenerator.Optimizely

Step 2: Configure API Key

Add the following configuration to your appsettings.json:

{
  "AIImageGenerator": {
    "ApiKey": "your-api-key-here"
  }
}

Step 3: Add Property to Product Content Type

Add the following property to your ProductContent model:

using System.ComponentModel.DataAnnotations;
using EPiServer.Core;

namespace YourProject.Models.Catalog
{
    public class YourProductContent : ProductContent
    {
        [Display(
            Name = "AI Generated Image",
            Description = "Generate AI-powered product images",
            GroupName = SystemTabNames.Content,
            Order = 100)]
        [UIHint("AIImageGenerator")]
        public virtual string AIGeneratedImage { get; set; }
    }
}

Step 4: Build and Run

  1. Build your solution
  2. Clear browser cache
  3. Navigate to Commerce → Catalogs → [Your Product]
  4. The AI Image Generator widget will appear in your product edit view

Usage

  1. Open a Product - Navigate to any product in Commerce Manager
  2. Locate the AI Image Generator - Find the "AI Generated Image" property
  3. Click "Generate Image" - Wait for the AI to create your image
  4. Review & Save - Preview the generated image and save your product

Customization

Change the Widget Appearance

Modify the styles in ClientResources/Scripts/AIImageGeneratorWidget.js (lines with .ai- CSS classes).

Add Additional Fields

Extend the ImageGenerationRequest model in Models/ImageGenerationRequest.cs.

Troubleshooting

Widget Not Appearing

  1. Clear browser cache and do a hard refresh (Ctrl+F5)
  2. Check module.config is properly loaded
  3. Verify UIHint is correctly set to "AIImageGenerator"
  4. Check browser console for JavaScript errors

API Key Errors

  1. Verify appsettings.json contains the correct API key
  2. Check configuration path: AIImageGenerator:ApiKey
  3. Restart application after changing appsettings.json

Image Not Generating

  1. Check browser network tab for failed requests
  2. Review application logs for detailed error messages
  3. Verify product has a primary image (required for generation)
  4. Test API endpoint directly with Postman/cURL

Authorization Issues

The extension requires one of these roles:

  • WebEditors
  • WebAdmins
  • Administrators

Ensure the current user has appropriate permissions.

Support

For support, please contact:

License

Commercial License - © 2025 GenieAI. All rights reserved.

Changelog

Version 1.0.0

  • Initial release
  • AI image generation integration
  • Lifestyle image blending
  • Custom prompt support
  • Secure API key management
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.2 170 10/17/2025
1.0.1 158 10/17/2025
1.0.0 167 10/17/2025

Initial release with AI-powered image generation based on your current product image, product name and description.