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

# image

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

## Declaration

```swift
var image: UIImage? { 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](uikit/nstextattachment/bounds.md)
- [contents](uikit/nstextattachment/contents.md)
- [fileType](uikit/nstextattachment/filetype.md)
- [fileWrapper](uikit/nstextattachment/filewrapper.md)
- [allowsTextAttachmentView](uikit/nstextattachment/allowstextattachmentview.md)
- [usesTextAttachmentView](uikit/nstextattachment/usestextattachmentview.md)
- [lineLayoutPadding](uikit/nstextattachment/linelayoutpadding.md)
