Next.js Discord

Discord Forum

Twitter card image not showing

Answered
Sage Grouse posted this in #help-forum
Open in Discord
Sage GrouseOP
Hello, I'm testing out the X (Twitter) cards functionality and am a little stuck right now. I have included the following metadata in the layout.js file (it has nothing to do with Google, just the first thing that came into my mind). I'm generating the image using ImageResponse function from vercel/og. However, the Twitter doesn't show the picture when I'm trying to link the website (twittercardtest.netlify.app). I would be grateful for any help.
export const metadata = {
  title: "Create Next App",
  description: "Generated by create next app",
  twitter: {
    card: "summary_large_image",
    site: "@googol",
    title: "Google",
    description: "Find anything you want in the web!",
    creator: "@google",
    image: "https://twittercardtest.netlify.app/api",
  },
};
Answered by Sage Grouse
Solved by using server side component
View full answer

4 Replies

Sage GrouseOP
Still looking for help
Sage GrouseOP
Haven't found the solution yet
Sage GrouseOP
Anyone familiar with Twitter cards here?
Sage GrouseOP
Solved by using server side component
Answer