AI-powered dummy content generator for Drupal, with a standalone PHP assets server as caching layer. Built for the Ypermedia workflow to skip the manual cycle of generating images in Gemini, resizing in Photoshop, uploading to a server, and importing into Drupal.
Two components that work together, but can also be used separately:
-
ypermedia_dummy/— Drupal 11 module. Define a "recipe" per content type (content context, image style guide, field mapping, aspect ratio, quality). Run a Drush command, get fully populated nodes with realistic AI-generated data and images. -
assets-server/— Tiny standalone PHP endpoint (singleindex.php). Acts as a persistent cache for generated images, so the same image isn't generated twice across projects or installs.
[Drush command] → [Gemini text API] → JSON records with specs
↓
[For each record]
↓
[Assets server: HEAD /project/recipe/machinename.jpg]
↓
cached? ───yes──▶ [download] ──▶ [attach to node]
│
no
↓
[Gemini image API] ──▶ [resize/crop to target size]
↓
[Upload to assets server] ──▶ [download back] ──▶ [attach to node]
The assets server trick is the interesting bit. Images generated for one project's dummy data are reusable across other projects and across fresh installs, so you pay Gemini once per unique (project, recipe, title) and never again.
This is a personal tool built for the Ypermedia workflow, shared as a showcase project. It's not actively maintained as a general-purpose module and has no stable release cycle, support channel, or backwards compatibility guarantees.
If you want a production-ready dummy content generator for Drupal, use one of these instead:
- AI Generate — similar idea, more mature, more features
- Drupal AI + Gemini Provider — full AI framework with pluggable providers, much broader scope
That said, if the assets server caching pattern or recipe-based approach is useful to you, feel free to fork or copy whatever helps.
- Drupal 10 or 11 with PHP 8.2+ and GD extension
- A Gemini API key (Google AI Studio, free tier available)
- A webserver (Apache with mod_rewrite, or Nginx) to host the assets server endpoint
- Deploy the assets server (instructions)
- Install the Drupal module (instructions)
- Configure the module with your Gemini API key, assets server URL, and project identifier
- Create a recipe via
/admin/config/content/dummy-recipe - Generate content:
drush ypermedia:generate-dummy my_recipe 10
GPL-2.0-or-later, matching Drupal convention.
Built by Ypermedia.