Skip to content
Discussion options

You must be logged in to vote

@TheLoloS try to use TwitterImageDescriptor instead of string and provide TwitterImageDescriptor : type, width, height.
If still do not work, make sure that file-generated twitter-image is set up correctly (if you use App Router): https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image

NOTE

ts
type TwitterMetadata = {
    site?: string | undefined;
    siteId?: string | undefined;
    creator?: string | undefined;
    creatorId?: string | undefined;
    description?: string | undefined;
    title?: string | TemplateString | undefined;
    images?: TwitterImage | Array<TwitterImage> | undefined;
}

type TwitterImage = string | TwitterImageDescriptor | URL;
type …

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TheLoloS
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants