---
title: "OG Image"
description: "Customizing the dynamic OG Image."
canonical_url: "https://lab.nnsvn.me/docs/api/configuration/og-image"
---

> Index of every page on this site: [llms.txt](https://lab.nnsvn.me/llms.txt)

**Nuxt Starter Kit** utilizes the [nuxt-og-image](https://nuxtseo.com/og-image/getting-started/installation) module to generate dynamic OG Images.

The dynamic OG Image is used in all pages **except** the index page. The index page uses a static OG Image defined in the [`ogImage`](https://lab.nnsvn.me/docs/api/configuration/shadcn-docs#site) field instead.

## Using Built-in Templates

To use a template, set the name of the OG Image component in the [`ogImageComponent`](https://lab.nnsvn.me/docs/api/configuration/shadcn-docs#site).

```ts [docs.config.ts]
export const DOCS_CONFIG = {
  site: {
    ogImageComponent: 'ShadcnDocs',
    ogImageColor: 'light', // or 'dark'
  },
};
```

Out of the box, a Nuxt Starter Kit template and multiple community templates are available.

<ct-tabs variant="card">
<div label="ShadcnDocs">

![Shadcn Docs OG Image Preview](https://lab.nnsvn.me/og-shadcn-docs.png)

</div>

<div label="ShadcnDocs (Dark)">

![Shadcn Docs OG Image Preview](https://lab.nnsvn.me/og-shadcn-docs-dark.png)

</div>

<div label="Nuxt">

![Nuxt OG Image Preview](https://lab.nnsvn.me/og-nuxt.png)

</div>

<div label="Nuxt SEO">

![NuxtSEO OG Image Preview](https://lab.nnsvn.me/og-nuxt-seo.png)

</div>
</ct-tabs>

<ct-alert icon="lucide:list" target="_blank" to="https://github.com/nuxt-modules/og-image/tree/main/src/runtime/app/components/Templates/Community">

See the full list of community templates.

</ct-alert>

## Using Custom Templates

To use a custom template, create a template by following the guide in the [Nuxt SEO Docs](https://nuxtseo.com/og-image/getting-started/getting-familar-with-nuxt-og-image#_1-create-your-template-component). Then set the component name of your template in `ogImageComponent`.

<ct-code-tree default-value="components/OgImage/BlogPost.vue">

```vue [components/OgImage/BlogPost.vue]
<template>
  <div class="flex size-full items-start justify-start border-[12px] border-solid border-blue-500 bg-gray-50">
    <div class="flex h-full items-start justify-start">
      <div class="flex size-full flex-col justify-between">
        <h1 class="p-20 text-left text-[80px] font-black">
          {{ title }}
        </h1>
        <p class="mb-0 px-20 pb-10 text-2xl font-bold">
          mycoolsite.com
        </p>
      </div>
    </div>
  </div>
</template>

<script setup lang="ts">
withDefaults(defineProps<{
  title?: string;
}>(), {
  title: 'title',
};
</script>
```

```ts [docs.config.ts]
export const DOCS_CONFIG = {
  site: {
    ogImageComponent: 'BlogPost',
  },
};
```

</ct-code-tree>

## Sitemap

See the full [sitemap](https://lab.nnsvn.me/sitemap.md) for all pages.
