#image command adds images to your Xcode asset catalog so your app can reference them by name anywhere in your code. Whether it’s an app icon, a background photo, or a custom illustration, this is how you get images into your app.
What It Does
When you use#image, the AI takes your selected image and:
- Adds it to your project’s asset catalog (Assets.xcassets)
- Names it based on your description or the original filename
- References it in your SwiftUI views wherever you specify
Image("name") in SwiftUI.
Supported Formats
| Format | Best for | Notes |
|---|---|---|
| PNG | Icons, UI elements, graphics with transparency | Lossless quality, supports alpha |
| JPEG | Photos, backgrounds | Smaller file size, no transparency |
| GIF | Simple animated images | Limited color palette |
| HEIC | High-efficiency photos | Apple’s modern photo format |
| TIFF | High-quality source images | Large file size |
| BMP | Legacy bitmap images | Uncompressed |
| SVG | Vector graphics, scalable icons | Resolution-independent |
How to Use
Select your image
The file picker opens, filtered to supported image formats. Choose the image you want to add.
Describe how to use it
The image appears as an orange chip below the input. Type a description of where the image should go in your app.
Example Prompts
Tips for Best Results
Use PNG for icons and UI elements
Use PNG for icons and UI elements
PNG supports transparency and keeps edges crisp — ideal for icons, buttons, and interface graphics.
Use JPEG for photos
Use JPEG for photos
JPEG files are significantly smaller than PNG for photographic content. Use them for backgrounds, hero images, and any photo-based assets.
SVG works great for scalable graphics
SVG works great for scalable graphics
SVG files are vector-based, so they look sharp at any size. Perfect for icons and illustrations that need to scale across different devices.
Name your files descriptively before importing
Name your files descriptively before importing
The original filename often becomes the asset name. A file called
settings-icon.png is much easier to work with than IMG_4392.png.#image adds the file to your app bundle. If you want to show the AI a design mockup or reference screenshot, drag-and-drop the image directly into the chat instead. Drag-and-drop images are seen by the AI but not added to your project.Related
Toolkit Overview
See all available # commands and how the toolkit works.
Using Images
Learn more about how Nativeline handles images in your projects.