---
title: "setImage(_:)"
framework: watchkit
role: symbol
role_heading: Instance Method
path: "watchkit/wkinterfaceimage/setimage(_:)"
---

# setImage(_:)

Sets the displayed image using the specified image object.

## Declaration

```swift
func setImage(_ image: UIImage?)
```

## Parameters

- `image`: The image to be displayed. Specifying nil removes the existing image, causing the watch interface to display nothing in the space previously occupied by the image. You may specify a template image or an animated image sequence for this parameter. For information on how to specify an animated image, see doc://com.apple.watchkit/documentation/WatchKit/WKInterfaceImage#Animating-a-Series-of-Images.

## Discussion

Discussion This method changes the image being displayed. Use this method to assign either a static image or an animated image that you created using the animatedImage(with:duration:) method. When setting images, always try to use images that are sized to fit the available space. Images are rendered according to the mode and size attributes you set for the image interface object.

## See Also

### Related Documentation

- [App Programming Guide for watchOS](apple-archive/documentation/General/Conceptual/WatchKitProgrammingGuide.md)

### Configuring the Image

- [setImageData(_:)](watchkit/wkinterfaceimage/setimagedata(_:).md)
- [setImageNamed(_:)](watchkit/wkinterfaceimage/setimagenamed(_:).md)
- [setTintColor(_:)](watchkit/wkinterfaceimage/settintcolor(_:).md)
