When a design needs pictures, such as a cover background, feature or gallery images, team photos, or product shots, WordPress Studio Code creates them and places them in the page. There’s no separate image mode or button. Ask for what you want, and the agent generates images when the design calls for them.
Applies to: WordPress Studio Code in the WordPress Studio app and in the terminal, in WordPress Studio 1.20.0 or later. You need a connected provider that makes images.
Before you start
Connect a provider that makes images, in Settings → Providers or with /connect. See AI providers. These providers make images:
- WordPress.com, which uses the same AI credit balance as the rest of WordPress Studio Code. See How AI Credits Work.
- OpenAI with an API key (not a ChatGPT plan), Google Gemini, Meta, or xAI with a Grok sign-in or an API key. Each one bills that account.
Anthropic, GitHub Copilot, OpenRouter, and local models don’t make images.
Choose which provider makes images
Default image provider, in Settings → Providers, sets which provider makes images. On Auto, the default, WordPress Studio Code uses the chat’s provider when it makes images. Otherwise it uses the first connected provider that does, in the order listed above. If no connected provider makes images, image generation is off.
When another agent uses WordPress Studio over MCP, it gets the same image generation, from Default image provider or the first connected provider that makes images. Codex is the exception: it makes site images with its own image_gen tool, on your Codex plan.
Ask for images
Describe what you want in the chat. For example:
Build a homepage for a neighborhood bakery, with a full-width cover photo and a three-column section for the signature loaves.
The gallery images on the About page look generic. Regenerate them so they show the workshop itself, not stock-style close-ups.
You can also set the look of every image:
Use warm natural window light and soft, muted color for all the imagery.
How WordPress Studio Code generates images
The agent plans every image a page needs before it writes the markup. It asks for them all at once, and right away gets each image’s file path, and for media library images, the attachment ID and URL. The images then generate in the background, five at a time, while the agent writes the markup that uses them.
Screenshots and design previews wait for the images to finish. If an image fails, the agent is told, so it can generate the image again or change the layout. Pages never keep a reference to an image that doesn’t exist.
What gets produced
Every generated image is saved as a WebP file (.webp), on one of three canvas sizes: 1024×1024 (square), 1536×1024 (landscape), or 1024×1536 (portrait).
The agent asks for a shape that fits the layout slot. WordPress Studio renders it on the nearest canvas, except Google Gemini and xAI, which render the shape’s own ratio. The page’s CSS then crops the image to its slot:
| Shape | Ratio | Typical use | Canvas |
|---|---|---|---|
| landscape | 16:9 | Cover and banner images, wide feature rows — the default | 1536×1024 |
| ultrawide | 21:9 | Full-bleed backgrounds spanning the viewport edge to edge | 1536×1024 |
| portrait | 9:16 | Tall editorial shots, full-height panels | 1024×1536 |
| card-landscape | 4:3 | Product cards, blog thumbnails, feature images in columns | 1536×1024 |
| card-portrait | 3:4 | Team headshots, tall product cards, framed insets | 1024×1536 |
| square | 1:1 | Slots that are genuinely square | 1024×1024 |
Images shown together in one row or grid always share a shape, so grids stay even.
There are eight styles: photorealistic (the default), digital-art, illustration, minimalist, flat-design, 3d-render, abstract, and watercolor. The agent keeps one style across a site unless you ask it to mix them.
Where the files go
WordPress Studio Code saves generated images in your site’s folder. Where an image goes depends on where it shows:
- Theme images show in the theme’s own files: templates, template parts such as the header or footer, and
style.css. They’re saved inwp-content/themes/<theme-slug>/assets/images/, and the markup refers to them by path. They travel with the theme when you export or publish it. - Content images show inside a page or post, such as a page’s cover image, product shots, team photos, and gallery items. They’re imported into the media library as attachments. Blocks refer to them by attachment ID and URL, like an image you uploaded, so you can swap, crop, or reuse them in the editor.
Every content image gets descriptive alt text. Cover backgrounds are decorative, so they get empty alt text, because the heading on top of them already describes the section.
WordPress Studio Code only saves images inside your WordPress Studio sites folder.
Get better results
- Describe the subject and mood, not file specs. “A quiet workshop with morning light coming through high windows” gives the agent more to work with than “a hero image.”
- Set the look once. Name the light, color, and finish you want early, and every image on the site matches.
- Ask for text as content, not as a picture. “Put the tagline over the cover image” gives you real text over the photo. The agent declines “Generate an image with our tagline written on it.”
- Change one image at a time. Ask the agent to regenerate a single image, and the rest of the page stays as it is.
- Check the result. Ask the agent to take a screenshot of the page, so it can confirm the images show, fill their slots, and keep text on top of them readable.
Limits
- One request can cover up to 20 images, so a whole page, or a small site, is usually one batch.
- Images are saved as WebP files, on the three canvas sizes above.
- The agent doesn’t generate images with text written in them.
Troubleshooting
Why doesn’t WordPress Studio Code generate images?
No connected provider makes images, for example when you use only Anthropic, GitHub Copilot, OpenRouter, or a local model. Connect WordPress.com, OpenAI with an API key, Google Gemini, Meta, or xAI in Settings → Providers.
Why did the agent use a different provider for images than for the chat?
The chat’s provider doesn’t make images, or Default image provider names another provider. Change Default image provider in Settings → Providers.
Related
- Agent Skills in WordPress Studio
- MCP on WordPress Studio: how other agents use WordPress Studio, including image generation
- How AI Credits Work
- Providers in WordPress Studio