nextjs - 💡(How to fix) Fix V16 generateImageMetadata doc inconsistency [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#85655Fetched 2026-04-08 02:14:43
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Author
Timeline (top)
closed ×1commented ×1labeled ×1locked ×1
RAW_BUFFERClick to expand / collapse

In the “Upgrading to Version 16” docs describing changes to OG Image generation, both generateImageMetadata and the image generation function are said to now receive promises as their inputs:

https://github.com/vercel/next.js/blob/8c263a9ed42da37bc9c1745890f21a6c46034438/docs/01-app/02-guides/upgrading/version-16.mdx?plain=1#L329-L332

However, there doesn’t appear to be any other place where generateImageMetadata is described as now taking a promise; in particular, the API reference for that function says it gets the values synchronously:

https://github.com/vercel/next.js/blob/8c263a9ed42da37bc9c1745890f21a6c46034438/docs/01-app/03-api-reference/04-functions/generate-image-metadata.mdx?plain=1#L22-L28

Not sure which of these is correct (I think it’s the latter, but I’m not sure), but they are currently inconsistent.

extent analysis

TL;DR

  • Review the generateImageMetadata function usage to ensure it matches the expected synchronous input as per the API reference.

Guidance

  • Verify the input type expected by generateImageMetadata in the current implementation to determine if it aligns with the synchronous input described in the API reference.
  • Check the documentation for any other mentions of generateImageMetadata receiving promises to confirm the inconsistency.
  • Compare the behavior of generateImageMetadata with the image generation function to understand how promises are handled in similar contexts.
  • Test generateImageMetadata with both synchronous and promise inputs to observe its actual behavior and resolve the inconsistency.

Notes

  • The inconsistency between the "Upgrading to Version 16" docs and the API reference for generateImageMetadata needs clarification from the maintainers or further investigation in the codebase.
  • Without explicit confirmation from the documentation or code, it's uncertain whether generateImageMetadata should receive promises or synchronous inputs.

Recommendation

  • Apply workaround: Use the synchronous input as described in the API reference until the inconsistency is resolved or further clarification is provided, as it seems to be the more consistently documented approach.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING