WP Manifestindependent plugin directory
manifest / seo / llm-seo-generator

LLM SEO Generator

AI-powered SEO metadata generation for images using local (Ollama) or API-based LLMs (Claude, OpenAI). Generate alt text, captions, and descriptions with vision support.

by Danny Breckenridge · github.com/dbreck/llm-seo-generator

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/dbreck/llm-seo-generator/archive/refs/heads/main.zip

AI-powered SEO metadata generation for WordPress images using local (Ollama) or API-based LLMs (Claude, OpenAI).

Generate alt text, titles, captions, and descriptions with AI vision support. Works with local LLMs (free, unlimited) or cloud providers.


🌟 Key Features

  • 🖼️ Vision-Powered Analysis - AI actually sees your images to generate accurate descriptions
  • 🏠 Local-First - Run Ollama locally with no API costs or rate limits
  • ⚡ Bulk Processing - Generate metadata for hundreds of images with progress tracking
  • 🎯 SEO Optimization - Smart title generation and targeted keyword integration
  • ♿ Accessibility Focused - WCAG-compliant alt text for screen readers
  • 🎨 Flexible Modes - Fill gaps only or regenerate everything
  • ⚙️ Provider Choice - Works with Ollama, Claude, or OpenAI
  • 📦 Manual Selection - Pick specific images or use smart filters
  • 🔄 Format Conversion - Automatic WebP/PNG to JPEG for Ollama compatibility

🚀 Quick Start

1. Installation

# Clone the repository
git clone https://github.com/dbreck/llm-seo-generator.git

# Move to WordPress plugins directory
mv llm-seo-generator /path/to/wordpress/wp-content/plugins/

# Activate in WordPress Admin → Plugins

2. Setup Ollama (Recommended - Free & Local)

# Install Ollama from ollama.ai
curl -fsSL https://ollama.ai/install.sh | sh

# Pull the vision model
ollama pull llava

# Keep Ollama running
# It runs at http://localhost:11434 by default

3. Configure in WordPress

  1. Go to LLM SEO Generator → Settings
  2. Select Ollama as your provider
  3. Endpoint: http://localhost:11434
  4. Model: llava:latest
  5. Set your default SEO keywords
  6. Start generating!

📖 What Gets Generated

Title (New!)

Vision-based, unique titles describing what the AI actually sees:

  • ✅ "White Coastal Home Blue Roof"
  • ✅ "Modern Kitchen Marble Countertops"
  • ✅ "Pool Deck Ocean View"
  • ❌ "Luxury Custom Home" (too generic)

Alt Text

Brief, accessible descriptions (100-125 chars):

White coastal home with blue metal roof and palm tree landscaping

Caption

Engaging 1-2 sentence descriptions:

A charming coastal residence featuring a distinctive blue metal roof and tropical landscaping.

Description

Comprehensive 2-3 sentence details:

This elegant coastal home showcases classic architecture with modern updates, including a blue metal roof, white exterior, and professional landscaping featuring palm trees and colorful plantings.

🎯 Three Ways to Generate

1. Single Image Testing

Perfect for refining prompts and testing quality:

  • Upload or select an image
  • Choose which fields to generate (Title, Alt Text, Caption, Description)
  • Add SEO keywords
  • Preview results before saving

2. Bulk Processing

Process hundreds of images efficiently:

  • Filter Mode: Find images missing alt text, captions, or descriptions
  • Manual Mode: Select specific images from media library
  • Processing Modes:
    • "Only add missing" (safe, preserves existing)
    • "Regenerate all" (overwrites everything)
  • Real-time progress tracking with pause/resume
  • Batch processing (10 images at a time)

3. Quick Generation

One-click from attachment details modal:

  • Click "Generate Metadata" button in media library
  • Uses your default settings
  • Instant results

🔧 Provider Options

Ollama (Recommended)

  • Free - No API costs ever
  • Unlimited - No rate limits
  • Private - Data never leaves your server
  • Fast - ~10 images per minute
  • Models: llava, llama3.2-vision, bakllava

Claude (Anthropic)

  • 💰 Paid - API usage costs
  • Fast - High-quality results
  • 🎯 Accurate - Best vision analysis
  • Recommended Model: claude-3-5-sonnet-20241022

OpenAI

  • 💰 Paid - API usage costs
  • Fast - Good quality
  • 🌐 Widely Available
  • Recommended Model: gpt-4o

🛠️ Technical Features

Smart Title Generation

The plugin uses advanced prompt engineering to ensure unique, vision-based titles:

Title Formula: [Primary Subject] + [Key Visual Feature(s)]

5-Point Validation:

  1. Identifies primary subject (building, room, landscape)
  2. Mentions distinctive visual features (color, material, style)
  3. Passes uniqueness test (distinguishable from other images)
  4. Maintains 3-6 word length
  5. Avoids generic marketing language

Visual Element Library:

  • Architecture: Colonial, Modern, Craftsman, Victorian, Contemporary
  • Colors: White, Blue, Gray, Red, Beige, Two-tone
  • Materials: Brick, Stone, Wood, Metal, Glass, Stucco
  • Features: Pool, Garden, Balcony, Porch, Deck, Fireplace
  • Styles: Traditional, Modern, Rustic, Industrial, Coastal

Image Format Conversion

Automatic conversion for Ollama compatibility:

  • JPEG → Direct processing (no conversion)
  • PNG → Converts to JPEG (90% quality)
  • WebP → Converts to JPEG (90% quality)
  • Temp files automatically cleaned up
  • Uses WordPress image editor (GD/ImageMagick)

Provider Abstraction

Easy to extend with new providers:

class Custom_Provider extends LLM_SEO_Abstract_Provider {
    protected function init() {
        $this->provider_id = 'custom';
        $this->provider_name = 'Custom Provider';
    }

    public function generate_seo_data($post_id, $content_data) {
        // Your implementation
    }
}

💡 Use Cases

Real Estate Photography

  • Bulk process property photos
  • SEO keywords: "luxury waterfront condo St Petersburg"
  • Generate titles: "Waterfront Condo Sunset View"

E-commerce Products

  • Product image descriptions
  • SEO keywords: "handmade ceramic pottery"
  • Accessibility-compliant alt text

Photography Portfolios

  • Organize large image libraries
  • Descriptive titles for easy finding
  • Professional captions for exhibitions

📊 Performance

Benchmarks (Ollama llava on M1 Mac)

  • Single Image: 3-5 seconds
  • Bulk Processing: ~10 images per minute
  • Memory Usage: ~2GB during processing
  • Format Conversion: <1 second per image

Best Practices

  • Use Ollama locally for maximum speed
  • Process during off-peak hours for large batches
  • Start with 10-20 images to refine prompts
  • Use "Only add missing" for safe processing
  • Set realistic SEO keywords

🔒 Privacy & Security

Ollama (Local)

  • ✅ No data leaves your server
  • ✅ Complete privacy
  • ✅ No external API calls

Claude/OpenAI

  • ⚠️ Images sent to provider APIs
  • ⚠️ Review provider privacy policies
  • ⚠️ Consider data sensitivity

Security Features

  • No API keys hardcoded
  • Sanitized inputs/outputs
  • WordPress nonce verification
  • Capability checks

🐛 Troubleshooting

Ollama Not Available

# Check if Ollama is running
curl http://localhost:11434/api/tags

# Start Ollama
ollama serve

WebP/PNG Conversion Fails

  • Ensure GD or ImageMagick is installed
  • Check PHP memory limit (256MB recommended)
  • Verify wp-content/uploads is writable

Bulk Processing Timeout

  • Reduce batch size in code (default: 10)
  • Increase PHP max_execution_time
  • Process smaller batches

📝 Development

File Structure

llm-seo-generator/
├── admin/
│   ├── css/           # Admin styles
│   └── js/            # Admin JavaScript
├── includes/
│   ├── providers/     # LLM provider implementations
│   ├── class-ajax-handlers.php
│   ├── class-media-data-handler.php
│   └── class-llm-provider-manager.php
├── llm-seo-generator.php  # Main plugin file
├── readme.txt         # WordPress plugin readme
└── README.md          # This file

Adding a New Provider

  1. Create class-yourprovider-provider.php
  2. Extend LLM_SEO_Abstract_Provider
  3. Implement required methods
  4. Register in provider manager

🤝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

📄 License

GPLv2 or later - https://www.gnu.org/licenses/gpl-2.0.html


👤 Author

Danny Breckenridge


🙏 Credits

Built with Claude Code - https://claude.com/claude-code

Special Thanks:

  • Ollama team for local LLM infrastructure
  • WordPress community
  • Anthropic for Claude API
  • OpenAI for GPT-4 Vision

⭐ Support

If you find this plugin useful:

  • ⭐ Star this repository
  • 🐛 Report bugs via GitHub Issues
  • 💡 Suggest features
  • 🔄 Share with others

Made with ❤️ for the WordPress community