---
title: "Browser Renderer"
description: "Learn how, when and why to use the Browser renderer."
canonical_url: "https://nuxtseo.com/docs/og-image/renderers/browser"
---

> Index of every page on this site: [llms.txt](https://nuxtseo.com/llms.txt)

The Browser renderer uses a real browser to take screenshots, giving you full CSS support.

Using Browser is only recommended when you are prerendering all of your images.

## Installation

::code-group
```sh [pnpm]
pnpm i -D playwright-core
```

```bash [yarn]
yarn add -D playwright-core
```

```bash [npm]
npm install -D playwright-core
```
::

If `playwright-core` is missing, the build fails and prints the install command.

To use a local Chrome in development and local builds, also install `chrome-launcher`:

::code-group
```sh [pnpm]
pnpm i -D chrome-launcher
```

```bash [yarn]
yarn add -D chrome-launcher
```

```bash [npm]
npm install -D chrome-launcher
```
::

::note
Without `chrome-launcher`, the module downloads Chromium through [Playwright](https://playwright.dev) on the first render.
::

## Page screenshots

For `defineOgImageScreenshot()`{lang="ts"}, enable screenshots explicitly:

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  ogImage: {
    browser: true
  },
  routeRules: {
    '/': { prerender: true }
  }
})
```

Replace `/` with your screenshot page routes.
Then call `defineOgImageScreenshot()`{lang="ts"} in each page you want to capture.
A browser provider object also enables screenshots.

Screenshot calls require this opt-in even when you have a `.browser.vue` component.
The module does not scan pages for screenshot calls.

During `nuxt build`, prerendering uses a local browser and writes image files for production to serve.
`browser: true` does not enable runtime screenshots on incompatible hosts.
For runtime screenshots on Cloudflare, configure [Browser Rendering](#cloudflare-browser-rendering).

## Component images

The component filename suffix determines the renderer. Create your component with a `.browser.vue` suffix:

```bash
components/OgImage/MyTemplate.browser.vue
```

The module automatically detects the renderer from the filename - zero-config.

## Pros

- Full CSS support - any design you can build
- Render JPEGs without using `sharp`
- Page screenshots are simple and saves time

## Cons

- Requires a browser binary installation
- Much slower than Satori/Takumi, using it at runtime is not recommended (see [Performance](https://nuxtseo.com/docs/og-image/guides/performance#caching))
- Doesn't work on most hosting providers

## Development & CI Browser

In development, `chrome-launcher` finds a local Chrome for the module to use, if you install it.

Otherwise, it uses `playwright` when installed, or downloads Chromium through `playwright-core`.

When prerendering your images in a CI environment, the module will automatically install a browser binary for you.

If you'd like to opt-out of this, you should disable the binding.

```ts [nuxt.config.ts]
export default defineNuxtConfig({
  ogImage: {
    compatibility: {
      prerender: {
        browser: false
      }
    }
  }
})
```

## Runtime Browser

The module only enables the Browser renderer by default in runtime environments if you explicitly include the `playwright-core`
dependency and the target environment is compatible.

See the [renderer compatibility overview](https://nuxtseo.com/docs/og-image/renderers) for more information.

## Cloudflare Browser Rendering

For Cloudflare Workers/Pages deployments, you can use [Cloudflare Browser Rendering](https://developers.cloudflare.com/browser-rendering/) for runtime screenshots.

See the [Cloudflare deployment guide](https://nuxtseo.com/docs/og-image/guides/cloudflare#browser-rendering) for setup instructions.

When using the [Cloudflare](https://cloudflare.com) provider:

- **Development:** Uses a local Chrome through `chrome-launcher`, when installed
- **Prerender/Build:** Uses `playwright`
- **Production Runtime:** Uses Cloudflare Browser Rendering

The module automatically handles session reuse and timeout handling for optimal performance within Cloudflare's rate limits.

## Sitemap

See the full [sitemap](https://nuxtseo.com/sitemap.md) for all pages.
