Zero Runtime · Nuxt OG Image · Nuxt SEO

-
-
-
-

[1.4K](https://github.com/harlan-zw/nuxt-seo)

[Nuxt SEO on GitHub](https://github.com/harlan-zw/nuxt-seo)

You're viewing **OG Image v5** documentation. For the latest,

.

OG Image

-
-
-
-
-
-
-
-
-
-

Search…```k`` /`

v5

- Playgrounds
- [Discord Support](https://discord.com/invite/275MBUBvgP)

### Getting Started

-
-
-
-

### Core Concepts

-
-
-
-
-
-
-
-
-
-
-
-
-
-

### Integrations

-
-

Core Concepts

# Zero Runtime

[Copy for LLMs](https://nuxtseo.com/docs/og-image/v5/guides/zero-runtime.md)

When using Nuxt as a server-side app with prerendered OG Images, you are forced to have runtime OG images as well which added significant overhead to the server build.

To address this, we introduce the `zeroRuntime` config, which ensures all tree-shakable OG image code is removed from the final output.

## [Usage](#usage)

To enable zero runtime, add the following to your config:

nuxt.config.ts

```
export default {
  ogImage: {
    zeroRuntime: true
  }
}
```

You will need to make sure you're prerendering all of your pages that use OG images, as the server runtime will not be available.

```
export default defineNuxtConfig({
  nitro: {
    prerender: {
      crawlLinks: true,
      routes: [
        '/',
        // ...
      ],
    },
  }
})
```

## [Limitations](#limitations)

When using the Zero Runtime mode none of the community templates will be available in your final build, you must copy+paste any community template that you wish to use into your `components/OgImage` folder.

## [Benchmarks](#benchmarks)

**Nuxt OG Image - Defaults**

Nitro: 1.6mb

- node_modules: 25mb

**Nuxt OG Image - Zero Runtime**

Nitro: 306kb (81% reduction)

- node_modules: 2.0mb (92% reduction)

[Edit this page](https://github.com/nuxt-modules/og-image/blob/v5.1.13/docs/content/3.guides/1.zero-runtime.md)

[Markdown For LLMs](https://nuxtseo.com/docs/og-image/v5/guides/zero-runtime.md)

Did this page help you?

On this page

- [Usage](#usage)
- [Limitations](#limitations)
- [Benchmarks](#benchmarks)

[GitHub](https://github.com/harlan-zw/nuxt-seo) [ Discord](https://discord.com/invite/275MBUBvgP)

###

-
-

Modules

-
-
-
-
-
-
-
-
-

###

-
-
-

###

Nuxt

-
-
-
-
-

Vue

-
-
-
-
-
-
-
-

###

-
-
-
-
-
-
-
-
-
-

Copyright © 2023-2026 Harlan Wilton - [MIT License](https://github.com/harlan-zw/nuxt-seo/blob/main/license) · [mdream](https://mdream.dev)