Grok Imagine

Generate AI images directly in your image fields using x.ai (Grok)

Version: 1.7.5
Author: Maxim Alex
Website: smnv.org
Email: maxim@smnv.org
Release Date: February 21, 2026
License: MIT

GrokImagine is a ProcessWire module that allows you to generate high-quality AI images directly within your Pageimage fields using the x.ai (Grok) API.

Features


  • Progressive Loading: Images appear one-by-one as they are generated.
  • Batch Generation: Generate up to 4 variations at once with a single prompt.
  • Smart Variations: Automatically adds subtle prompt differences to ensure variety in batch results.
  • Format Support: Choose between 16:9, 1:1, 9:16, and 4:3 aspect ratios.
  • Model Selection: Supports grok-imagine-image-pro and grok-imagine-image.
  • Resolution Control: Toggle between 1k and 2k resolutions.
  • Interactive UI: Preview results, select the ones you like, and save them directly to the page.

Installation


  1. Upload the GrokImagine folder to your /site/modules/ directory.
  2. In the ProcessWire admin, go to Modules > Refresh.
  3. Find Grok Imagine and click Install.

Configuration


  1. Go to the module settings.
  2. Enter your x.ai API Key (obtainable at console.x.ai).
  3. Select which image fields should have the Grok Imagine interface enabled.
  4. Choose your preferred default model and resolution.

How to Use


  1. Open a page for editing that contains an enabled image field.
  2. Locate the Grok Imagine bar below the image field.
  3. Enter a prompt, select your desired aspect ratio and quantity.
  4. Click Generate.
  5. Once images appear, click on the ones you want to keep (a blue checkmark will appear).
  6. Save the page to download and store the selected images.

License


MIT License - Free to use in personal and commercial projects.

More modules by Maxim Semenov

  • WireWall

    Advanced traffic firewall with VPN/Proxy/Tor detection, rate limiting, and JS challenge
  • LQRS URL Shortener Profile

    This site profile for ProcessWire offers a free and easy-to-use URL shortener that transforms long links into concise, shareable URLs. It is built using standard ProcessWire modules and field types.
  • Media Platform Profile

    This site profile for ProcessWire offers a fully-featured media platform for hosting and managing video content with Backblaze B2 and Cloudflare integration.
  • Context

    Export ProcessWire site context for AI development (JSON + TOON formats)
  • AgeWire

    Age verification module with Tailwind CSS support
  • 2048

    Take a break with 2048 game in ProcessWire admin
  • Invite Access

    Restricts site access to visitors with a valid invite code. Designed for staging environments with multiple teams.
  • WirePDF

    Convert ProcessWire pages to PDF documents with advanced typography support
  • Banana Imagine

    Generate AI images directly in your image fields using Google Gemini API.

All modules by Maxim Semenov

Install and use modules at your own risk. Always have a site and database backup before installing new modules.