vercel / vercel/next.js

Docs: document how `generateImageMetadata` and `generateStaticParams` interact in `opengraph-image.tsx`

Open
#76,323 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

What is the documentation issue?

it is not really clear from the docs how generateStaticParams and generateImageMetadata interact in an opengraph-image.tsx file.

when only generateStaticParams is present, opengraph images are generated at build time, but when adding generateImageMetadata this is no longer the case.

afaiu both server different purposes, but practically one seems to override the other. please clarify - thanks

Is there any context that might help us understand?

see above

Does the docs page already exist? Please link to it.

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the documentation for opengraph-image.tsx, generateStaticParams, and generateImageMetadata. Verify how the two functions behave together, especially the difference between build-time generation and metadata-driven generation, then document the interaction and expected runtime behavior with a clear example.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs
Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.