---
title: image
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextattachment/image
---

# image

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

## Declaration

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

## Discussion

Discussion For details about using the UIImage class to create text attachments that automatically adjust to surrounding font and color attributes, see the init(image:) initializer.

## See Also

### Defining the attachment’s contents

- [bounds](appkit/nstextattachment/bounds.md)
- [contents](appkit/nstextattachment/contents.md)
- [fileType](appkit/nstextattachment/filetype.md)
- [fileWrapper](appkit/nstextattachment/filewrapper.md)
- [allowsTextAttachmentView](appkit/nstextattachment/allowstextattachmentview.md)
- [usesTextAttachmentView](appkit/nstextattachment/usestextattachmentview.md)
- [lineLayoutPadding](appkit/nstextattachment/linelayoutpadding.md)
