Appearance
Image Generation
Use Image Generation to create an image from a text prompt.
Configure the action
| Field | What it does |
|---|---|
Provider | The AI provider to use. |
Model | An image model for that provider. |
Prompt | A description of the image, for example "A ceramic coffee mug on a walnut desk." |
Depending on the model, you may also see options such as Number of Images, Size, Aspect Ratio, Quality, Format, Resolution, or Seed. These only appear when the selected model supports them.
Learn how to choose a provider →
Use the result
The action does not return a URL. It returns one or more images as a data URI.
- The image to display is
images[0].dataUri(for exampledata:image/png;base64,...). - The file type is
images[0].mediaType(for exampleimage/png). - If you generated more than one image, use the full
imageslist.
You can bind images[0].dataUri to an Image element to preview it right away.
A data URI is fine for a quick preview. If the image needs to survive a reload, be shared, or be stored on a record, upload it to WeWeb Storage and save the storage path.
Common pitfalls
The generated image will not load from a URL
Image Generation returns a data URI, not a file URL. Bind images[0].dataUri. If you need a normal URL, upload the image to storage first.

