Set a publicly accessible, absolute image URL with Nuxt’s useSeoMeta composable. For example, useSeoMeta({ ogImage: 'https://example.com/og-image.png' }) outputs the Open Graph image metadata used by link previews. Put shared defaults in a common location and override them with route-specific data when needed; make sure the metadata is present in the initial server-rendered HTML and the image URL works on your deployed site.
Set a shared Open Graph image
For a single image used across your site, call useSeoMeta in a shared component such as app.vue. You can also set it in a page when the image should apply only to that route. The following Nuxt 4 example sets an image along with the other common sharing fields:
As an Amazon Associate I earn from qualifying purchases.
<script setup lang="ts">
useSeoMeta({
ogTitle: 'My page title',
ogDescription: 'A short description of this page.',
ogImage: 'https://example.com/og-image.png',
twitterCard: 'summary_large_image',
})
</script>
Replace the example URL with the public URL of your own image. Nuxt maps the ogImage key to the Open Graph image metadata. Nuxt recommends useSeoMeta for common SEO fields because its typed keys help prevent mistakes such as confusing a name attribute with a property attribute. See the Nuxt 4 useSeoMeta documentation.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Put a static image in the public directory
For a file that does not need to be generated or imported through your build, put it in Nuxt’s public/ directory and reference its deployed, absolute URL in the metadata. Nuxt serves public assets from the site root; for example, a file named og-image.png can be referenced at https://example.com/og-image.png when deployed at that domain. Check the URL on the production site, not just in development. Nuxt’s public directory documentation describes this directory.
Choose where metadata belongs
Use one clear owner for each metadata field so that shared defaults and page-level overrides are predictable.
- One image for the whole site: set it in a shared component such as
app.vue, or use static defaults inapp.headinnuxt.config.ts. - Different image on selected pages: keep a shared default, then set
ogImagein the relevant page withuseSeoMeta. - Metadata derived from page data: use the page’s data and a reactive getter where necessary, ensuring the value is ready for initial server rendering.
- Broader head management: use
useHeadwhen you need general head customization beyond common SEO fields.
Nuxt documents app.head as suitable for static defaults; it does not support reactive data. Avoid independently setting the same field in multiple places with useHead and useSeoMeta unless you have verified which value wins in the rendered output. Nuxt’s SEO and Meta guide covers these approaches.
Rank #2
Use a page-specific image from fetched data
If each page has its own image URL, derive the metadata from that page’s data. Nuxt’s useSeoMeta supports getter syntax for reactive values:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
const imageUrl = computed(() => page.value?.socialImage ?? 'https://example.com/default-og.png')
useSeoMeta({
ogImage: () => imageUrl.value,
})
Here, page represents the page data in your application. Replace it with the data source used by your route. The fallback ensures there is still an image URL if the page has no custom social image.
Search and social crawlers may inspect the HTML returned for the initial page rather than wait for client-side code to update it. Nuxt notes that SEO metadata often does not need reactivity because bots primarily scan the initial page load. When metadata depends on fetched data, make that data available during server rendering where feasible, and inspect the actual rendered HTML to confirm the final og:image value is present.
When to generate images instead of using a static file
A static image URL is enough for many sites. Consider a generator if many routes need distinct branded title cards or if each preview should include page-specific text. The Nuxt OG Image module can create og:image output using templates or Vue components; its listing also describes a Nuxt DevTools preview, rendering through Satori or Takumi, browser prerendering for complex templates, and screenshots of pages. It is optional, not required to set a conventional image URL. The module listing showed version 6.10.1 in the available source material; module versions and capabilities can change.
Rank #4
To add it, run the installation command from the Nuxt OG Image module listing:
npx nuxi@latest module add og-image
Use the module when its generated-image workflow fits your site; for a single shared asset, a public file and useSeoMeta are simpler.
Best Value
Check the rendered page and troubleshoot previews
- Inspect the deployed page’s HTML. Confirm it contains an
og:imagetag with the intended URL and that the value is not empty or stale. - Open the image URL independently. It should resolve on the production domain and be fetchable without a local development server or browser-only state.
- Check route data timing. If a page-specific value appears only after client-side rendering, move the relevant data and metadata into the initial server-rendered path where practical.
- Review duplicate head declarations. If multiple composables or defaults set the same field, simplify ownership and inspect which tag Nuxt ultimately renders.
- Use the target platform’s sharing debugger. A correct tag does not guarantee that every platform displays an identical preview. The Nuxt OG Image listing recommends checking previews with social sharing debuggers.
Common symptoms and fixes
| Symptom | Likely cause | What to check |
|---|---|---|
| No image tag in the initial HTML | The metadata is set only after client-side rendering, or the composable is not in the route’s rendering path. | Use useSeoMeta in the page or a shared component and verify the server-rendered output. |
| The tag exists, but the image cannot be loaded | The URL is relative, only works in development, or is otherwise inaccessible to a remote crawler. | Use the deployed absolute URL and open it independently. |
| A route shows the wrong image | A shared default, page-level value, or another head declaration is overriding the intended value. | Assign each field a clear owner and inspect the final rendered tag for that route. |
| Different platforms show different previews | Platforms may process previews differently; a valid tag alone does not ensure identical display. | Test with the relevant platform’s debugger. Do not assume one platform’s result proves another’s behavior. |
Exact current platform image dimensions, supported formats, and cache behavior are not established here, so do not treat a single dimension or preview test as a universal guarantee.
Nuxt 3 compatibility
The same general ogImage approach is documented in Nuxt’s versioned Nuxt 3 SEO guide: Nuxt 3 SEO and Meta. That versioned documentation identifies Nuxt 3.21.11, and Nuxt states that Nuxt 3 reached end of life on 31 July 2026. For a new implementation, use the current Nuxt 4 documentation and confirm version-specific behavior against the documentation for the version your project runs.
Or skip the browser setup
If you need a screenshot of a page to use as an asset, ScreenshotNeo can return an image or PDF with one GET request. It is a screenshot API and MCP server for developers. Its consent handling accepts cookie banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, with the result indicated by X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots. Every feature is on every plan.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteFor example, this cURL request captures a page as WebP:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for the API options and response details. A screenshot of a page is not a substitute for setting the page’s intended Open Graph metadata; use it when a captured visual is the asset you want to publish.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →




