<!--
{
  "availability" : [
    "macOS: 10.12.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSImageView/init(image:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSImageView(cm)imageViewWithImage:"
  },
  "title" : "init(image:)"
}
-->

# init(image:)

Creates a non-editable image view containing the provided image. The image is scaled proportionally down to fit the view, and is centered within the view.

```
convenience init(image: NSImage)
```

## Parameters

`image`

The image to display within the view.

## Return Value

An initialized image view.

---

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)