---
title: "Route Rules · Nuxt OG Image · Nuxt SEO"
canonical_url: "https://nuxtseo.com/docs/og-image/v5/guides/route-rules"
last_updated: "2026-08-16T10:00:30.941Z"
meta:
  description: "Learn how to use route rules to customise your OG Image."
  "og:description": "Learn how to use route rules to customise your OG Image."
  "og:title": "Route Rules · Nuxt OG Image · Nuxt SEO"
---

Nuxt SEO on GitHub

You're viewing **OG Image v5** documentation. For the latest, [~~switch to v6~~](https://nuxtseo.com/docs/og-image/getting-started/introduction).

](https://nuxtseo.com/docs/og-image/v5/getting-started/introduction)

](https://nuxtseo.com/docs/og-image/v5/api/define-og-image)

](https://nuxtseo.com/docs/og-image/v5/releases/v5)

Switch to OG Image](https://nuxtseo.com/docs/og-image/getting-started/introduction)Switch to Nuxt SEO](https://nuxtseo.com/docs/nuxt-seo/getting-started/introduction)Switch to Robots](https://nuxtseo.com/docs/robots/getting-started/introduction)Switch to Sitemap](https://nuxtseo.com/docs/sitemap/getting-started/introduction)Switch to Schema.org](https://nuxtseo.com/docs/schema-org/getting-started/introduction)Switch to Link Checker](https://nuxtseo.com/docs/link-checker/getting-started/introduction)Switch to SEO Utils](https://nuxtseo.com/docs/seo-utils/getting-started/introduction)Switch to Site Config](https://nuxtseo.com/docs/site-config/getting-started/introduction)Switch to Skew Protection](https://nuxtseo.com/docs/skew-protection/getting-started/introduction)Switch to AI Ready](https://nuxtseo.com/docs/ai-ready/getting-started/introduction)

**Core Concepts**

# **Route Rules**

In some cases, you'll want to apply OG Image setting for a subset of pages.

You can handle this even easier with the route rule merging.

This lets you provide a `**ogImage**` key that will be either used or merged into the existing OG Image options.

For example, this documentation website uses it to set the `**icon**` depending on your path.

nuxt.config.ts

```ts
export default defineNuxtConfig({
  routeRules: {
    '/og-image/**': {
      ogImage: {
        props: { icon: 'carbon:image-search' }
      }
    }
  }
})
```

**Was this page helpful?**

[**Compatibility** Learn what environments can use what features.](https://nuxtseo.com/docs/og-image/v5/guides/compatibility) [**Caching Images** Getting to know how the Caching works with Nuxt OG Image.](https://nuxtseo.com/docs/og-image/v5/guides/cache)