WP Manifestindependent plugin directory
manifest / ai / ai-image-to-wordpress-plugin

AI Image to WordPress

Generate images with OpenRouter from the WordPress media area, optimize locally, apply SEO filename and readable alt text, then upload directly to Media Library.

by qipihen · github.com/qipihen/ai-image-to-wordpress-plugin · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/qipihen/ai-image-to-wordpress-plugin/archive/refs/heads/main.zip

中文说明

WordPress plugin for AI image generation with OpenRouter. It creates images, compresses them for web performance, applies SEO-friendly filenames, fills readable Alt text, uploads to Media Library, and returns the final image URL.

SEO Keywords

WordPress AI image generator, OpenRouter WordPress plugin, Gemini image generation, image compression plugin, automatic Alt text, SEO filename, featured image generator, image-to-image editing

Features

  • Generate images from prompt directly in WordPress admin
  • Optional image-to-image editing using Media Library image or external image URL
  • OpenRouter model support (default: google/gemini-3.1-flash-image-preview)
  • Low-cost metadata model support for natural filename/title/alt (default: google/gemini-2.5-flash-lite-preview-09-2025)
  • Local optimization before upload:
    • target size (KB)
    • max width and min width floor
    • JPEG quality loop
  • Prompt cache for API savings (reuse existing media on same input)
  • Similar-image dedupe before upload (perceptual hash)
  • Batch generation (1-6 images in one run, auto-disables cache/dedupe reuse for that run)
  • Multi-prompt batch mode (one prompt per line, one generated image per line)
  • CSV prompt import (import one prompt per row into Batch Prompts)
  • SEO filename format: {brand}-{keywords}.jpg (no forced timestamp)
  • Readable Alt/title generated by AI metadata rewriter (with fallback)
  • Upload into Media Library and return URL + attachment ID
  • Admin entry points:
    • Media -> AI Generate
    • Media list quick button
    • Media row action AI Edit
    • Post/Page editor metabox quick link
    • Admin bar quick link

Installation

  1. Upload folder to:
    • wp-content/plugins/ai-image-to-wordpress
  2. Activate AI Image to WordPress in WordPress Plugins.
  3. Open Media -> AI Generate.
  4. Save your OpenRouter API key.
  5. Generate and upload images.

Quick Start

  1. Enter prompt.
  2. Optional: choose source image from Media Library or paste external image URL.
  3. For multiple prompts, fill Batch Prompts with one prompt per line, or click Import Prompts CSV (this overrides Batch Count).
  4. Otherwise, use Batch Count for one prompt with multiple variations.
  5. Choose usage profile: content, featured, or hero.
  6. Click Generate and Upload.
  7. Copy generated image URL(s) and use in posts/pages.

Compatibility

  • WordPress: 6.x recommended
  • PHP: 8.0+ recommended
  • Works with Media Library workflows and page builders (including Elementor)
  • Designed to coexist with FileBird because it adds its own generator page/actions instead of replacing media UI

Verification

php -l ai-image-to-wordpress.php
node -e "new Function(require('fs').readFileSync('assets/admin.js','utf8'))"

Security Notes

  • OpenRouter key is stored in WordPress options (admin only).
  • Use HTTPS and strong admin access controls.
  • Keep plugin and WordPress updated.

License

GPL-2.0+