<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIImageView/image",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIImageView(py)image"
  },
  "title" : "image"
}
-->

# image

The image displayed in the image view.

```
var image: UIImage? { get set }
```

## Discussion

This property contains the main image displayed by the image view. This image is displayed when the image view is in its natural state. When highlighted, the image view displays the image in its [`highlightedImage`](/documentation/UIKit/UIImageView/highlightedImage) property instead. If that property is set to `nil`, the image view applies a default highlight to this image. If the [`animationImages`](/documentation/UIKit/UIImageView/animationImages) property contains a valid set of images, those images are used instead.

Changing the image in this property does not automatically change the size of the image view. After setting the image, call the [`sizeToFit()`](/documentation/UIKit/UIView/sizeToFit()) method to recompute the image view’s size based on the new image and the active constraints.

This property is set to the image you specified at initialization time. If you did not use the [`init(image:)`](/documentation/UIKit/UIImageView/init(image:)) or [`init(image:highlightedImage:)`](/documentation/UIKit/UIImageView/init(image:highlightedImage:)) method to initialize your image view, the initial value of this property is `nil`.

## See Also

[`animationImages`](/documentation/UIKit/UIImageView/animationImages)

An array of [`UIImage`](/documentation/UIKit/UIImage) objects to use for an animation.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)