<!--
{
  "availability" : [
    "macOS: 10.11.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSTextAttachment/image",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSTextAttachment(py)image"
  },
  "title" : "image"
}
-->

# image

An instance of the relevant image class that represents the contents of the text attachment object.

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

## Discussion

For details about using the <doc://com.apple.documentation/documentation/UIKit/UIImage> class to create text attachments that automatically adjust to surrounding font and color attributes, see the <doc://com.apple.documentation/documentation/UIKit/NSTextAttachment/init(image:)> initializer.

---

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)