---
title: WKSnapshotConfiguration
framework: webkit
role: symbol
role_heading: Class
path: webkit/wksnapshotconfiguration
---

# WKSnapshotConfiguration

The configuration data to use when generating an image from a web view’s contents.

## Declaration

```swift
@MainActor class WKSnapshotConfiguration
```

## Overview

Overview Create a WKSnapshotConfiguration object when you want to generate an image based on your web view’s content. Use this object to specify the portion of the web view to capture and the capture behavior. To generate the snapshot, pass the configuration object to the takeSnapshot(with:completionHandler:) method of WKWebView, which returns a platform-native image for you to use.

## Topics

### Specifying the snapshot dimensions

- [rect](webkit/wksnapshotconfiguration/rect.md)
- [snapshotWidth](webkit/wksnapshotconfiguration/snapshotwidth.md)

### Configuring the capture behavior

- [afterScreenUpdates](webkit/wksnapshotconfiguration/afterscreenupdates.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Snapshots

- [WKPDFConfiguration](webkit/wkpdfconfiguration.md)
