---
title: previewImage
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstextpreview/previewimage
---

# previewImage

The image that contains the requested text from your view.

## Declaration

```swift
var previewImage: CGImage { get }
```

## Discussion

Discussion You specify this image at initialization time. The system uses it to implement any visual effects involving your view’s text. Create the image with your text on a transparent background.

## See Also

### Getting the preview details

- [presentationFrame](appkit/nstextpreview/presentationframe.md)
- [candidateRects](appkit/nstextpreview/candidaterects.md)
