2022-07-05 13:41:43 +00:00
---
sidebar_label: ScreenshotOptions
---
# ScreenshotOptions interface
2022-10-24 07:07:05 +00:00
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
export interface ScreenshotOptions
```
## Properties
2024-03-20 15:03:14 +00:00
< table > < thead > < tr > < th >
Property
< / th > < th >
Modifiers
< / th > < th >
Type
< / th > < th >
Description
< / th > < th >
Default
< / th > < / tr > < / thead >
< tbody > < tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "capturebeyondviewport" > captureBeyondViewport< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
Capture the screenshot beyond the viewport.
< / td > < td >
`false` if there is no `clip` . `true` otherwise.
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "clip" > clip< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
[ScreenshotClip ](./puppeteer.screenshotclip.md )
< / td > < td >
2024-03-21 08:16:24 +00:00
Specifies the region of the page/element to clip.
2024-03-20 15:03:14 +00:00
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "encoding" > encoding< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
'base64' \| 'binary'
< / td > < td >
Encoding of the image.
< / td > < td >
`'binary'`
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "fromsurface" > fromSurface< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
Capture the screenshot from the surface, rather than the view.
< / td > < td >
`true`
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "fullpage" > fullPage< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
When `true` , takes a screenshot of the full page.
< / td > < td >
`false`
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "omitbackground" > omitBackground< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
Hides default white background and allows capturing screenshots with transparency.
< / td > < td >
`false`
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "optimizeforspeed" > optimizeForSpeed< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
boolean
< / td > < td >
< / td > < td >
`false`
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "path" > path< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
string
< / td > < td >
The file path to save the image to. The screenshot type will be inferred from file extension. If path is a relative path, then it is resolved relative to current working directory. If no path is provided, the image won't be saved to the disk.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "quality" > quality< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
number
< / td > < td >
Quality of the image, between 0-100. Not applicable to `png` images.
< / td > < td >
< / td > < / tr >
< tr > < td >
2024-04-11 11:01:13 +00:00
< span id = "type" > type< / span >
2024-03-20 15:03:14 +00:00
< / td > < td >
`optional`
< / td > < td >
'png' \| 'jpeg' \| 'webp'
< / td > < td >
< / td > < td >
`'png'`
< / td > < / tr >
< / tbody > < / table >