<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.13.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKSnapshotConfiguration",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKSnapshotConfiguration"
  },
  "title" : "WKSnapshotConfiguration"
}
-->

# WKSnapshotConfiguration

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

```
@MainActor class WKSnapshotConfiguration
```

## Overview

Create a [`WKSnapshotConfiguration`](/documentation/WebKit/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:)`](/documentation/WebKit/WKWebView/takeSnapshot(with:completionHandler:)) method of [`WKWebView`](/documentation/WebKit/WKWebView), which returns a platform-native image for you to use.

## Topics

### Specifying the snapshot dimensions

[`rect`](/documentation/WebKit/WKSnapshotConfiguration/rect)

The portion of your web view to capture, specified as a rectangle in the view’s coordinate system.

[`snapshotWidth`](/documentation/WebKit/WKSnapshotConfiguration/snapshotWidth)

The width of the captured image, in points.

### Configuring the capture behavior

[`afterScreenUpdates`](/documentation/WebKit/WKSnapshotConfiguration/afterScreenUpdates)

A Boolean value that indicates whether to take the snapshot after incorporating any pending screen updates.



---

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)