next.js
564794df - fix: metadataBase should take precedence when resolving relative ogImages (#73066)

Commit
1 year ago
fix: metadataBase should take precedence when resolving relative ogImages (#73066) When resolving opengraph / twitter images, we currently ignore the configured `metadataBase` value, which goes against the [documentation](https://nextjs.org/docs/app/api-reference/functions/generate-metadata#default-value) and doesn't seem correct, since an explicit `metadataBase` should be preferred over a fallback. This updates the handling to ensure an explicit `metadataBase` takes priority over the implicit path discovery. The one remaining special case here is for the "static metadata" case, aka the `opengraph-image` convention. We'll continue to prefer the fallback `metadataBase` in preview Vercel deploys & locally. Fixes #66957 Closes NDX-260
Author
Parents
Loading