> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Generation

> Learn how to generate AI images and add them to your projects with Agent.

Create visual content for your applications using Agent's image generation ![Image generation icon](https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/image.svg?fit=max\&auto=format\&n=rJldsgYVucXB_6kW\&q=85\&s=59ae41afbef6d40fb7b7de59d2ffc26b) capabilities.

Transform your ideas into custom images, illustrations, and graphics that perfectly match your project's needs. Whether you're building a website, mobile app, or any creative project, Agent generates images that bring your vision to life.

Image generation empowers builders to create unique visual content without needing design skills or external tools. Generate everything from icons and illustrations to backgrounds and UI elements directly within your development workflow.

## Features

Build visually compelling applications with Agent's image generation. This eliminates the need for stock photos, external design tools, or hiring designers for basic visual content. Whether you're creating a portfolio website, building a game, or designing a mobile app interface, image generation provides custom visuals tailored to your project.

Agent can perform the following image generation actions:

* **Custom image creation**: Generate images based on detailed descriptions and specifications
* **Style adaptation**: Create images in various artistic styles, from realistic to cartoon-like
* **Transparent backgrounds**: Generate images as transparent PNGs, or remove the background from an existing image — ideal for logos, icons, stickers, and product cutouts
* **Project integration**: Seamlessly add generated images directly to your app's codebase
* **Iterative refinement**: Modify and improve images based on your feedback

## Usage

Image generation is built into Agent, with no separate setup toggle.

Open your project and ask Agent to create the visual content you need. Describe the image's subject, style, dimensions, and intended use. Agent determines when to generate images based on your request.

### When Agent uses image generation

Agent triggers image generation when you request visual content for your projects:

| Use Case | Example Prompt |
| - | - |
| **App icons and logos** | "Generate a modern logo for my fitness tracking app" |
| **Website backgrounds** | "Create a subtle gradient background for my portfolio site" |
| **Game assets** | "Generate pixel art sprites for my platformer game" |
| **UI illustrations** | "Create an illustration for my app's empty state screen" |
| **Marketing visuals** | "Generate a hero image for my landing page" |
| **Product mockups** | "Create mockup images of my app running on different devices" |
| **Transparent logos and icons** | "Generate a logo for my app with a transparent background" |

### Best practices for image generation

Follow these guidelines to get the best results from Agent's image generation:

**Be specific and descriptive**

* Include details about style, colors, composition, and mood
* Specify dimensions or aspect ratios when relevant
* Mention the intended use (icon, background, illustration, etc.)
* Ask for a transparent background when you need a logo, icon, sticker, or cutout to sit over other content

**Iterate and refine**

* Start with a basic description and refine based on results
* Ask Agent to modify specific aspects of generated images
* Request variations to explore different creative directions

**Consider your project's style**

* Maintain visual consistency across your app
* Specify style preferences that match your brand or design system
* Ask for images that complement your existing visual elements

### Example prompts

Try these example prompts to get started with image generation:

Generate a clean, modern icon for my task management app. The icon should be
circular with a gradient background from blue to purple, featuring a simple
checkmark symbol in white. Make it suitable for use as an app icon.

Create a hero illustration for my coding tutorial website. Show a friendly
cartoon character sitting at a computer with code on the screen. Use a warm
color palette with blues and oranges. The style should be approachable and
encouraging for beginners.

Generate a set of pixel art enemies for my retro-style platformer game. I need
a flying bat, a walking mushroom, and a jumping slime. Each should be 32x32
pixels with a limited color palette of 8 colors. Make them cute but slightly
menacing.

### Project integration

Agent seamlessly integrates generated images into your codebase:

* **Automatic file creation**: Generated images are saved directly to your project files
* **Code updates**: Agent updates your code to reference the new image files
* **Asset organization**: Images are placed in logical directories within your project structure

This streamlined workflow means you can generate and implement visual content without leaving your development environment.

> [!NOTE]
>
> Replit can generate images from text descriptions.

Learn more about [working with Agent](https://docs.replit.com/features/agent/overview.md) or explore other [AI tools](https://docs.replit.com/welcome.md).
