---
title: "defineOgImageScreenshot()"
description: "Define an OG Image that takes a screenshot of the page."
canonical_url: "https://nuxtseo.com/docs/og-image/v5/api/define-og-image-screenshot"
last_updated: "2026-05-06T18:46:39.525Z"
---

## Introduction

The `defineOgImageScreenshot()` composable allows you to take a screenshot of the page and use it as the image.

This requires the `chromium` renderer, check the [chromium](/docs/og-image/guides/chromium) guide for more information.

## Props

### `colorScheme`

- Type: `'dark' | 'light'`
- Default: `'light'`

The color scheme to use when generating the image. This is useful for generating dark mode images.

```ts
defineOgImageScreenshot({
  colorScheme: 'dark'
})
```

### `delay`

- Type: `number`
- Default: `0`

The delay to wait before taking the screenshot. This is useful if you want to wait for animations to complete.

```ts
defineOgImageScreenshot({
  // wait 2 seconds
  delay: 2000
})
```

### `mask`

- Type: `string`
- Default: `undefined`

HTML selectors that should be removed from the image. Useful for removing popup banners or other elements that may be in the way.

```ts
defineOgImageScreenshot({
  mask: '.popup-banner, .cookie-banner'
})
```

### `selector`

- Type: `string`
- Default: `undefined`

The selector to take a screenshot of. This is useful if you want to exclude header / footer elements.

```ts
defineOgImageScreenshot({
  selector: '.page-content'
})
```
