Optionally Show Opengraph Image or Video
Unanswered
Arinji posted this in #help-forum
ArinjiOP
ok so i have the opengraph-image.tsx in my dynamic route /[id]/page.tsx
Now in my generateMetadata i get either a video link, or a short text which i pass to the opengraph image... but how do i make it optionally render a video?
Like if i get a short title back it renders this metadata
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx
if it gets a video, it renders this metadata
https://help.pebblehost.com/en/minecraft/how-to-install-a-minecraft-modpack
Now in my generateMetadata i get either a video link, or a short text which i pass to the opengraph image... but how do i make it optionally render a video?
Like if i get a short title back it renders this metadata
https://nextjs.org/docs/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx
if it gets a video, it renders this metadata
https://help.pebblehost.com/en/minecraft/how-to-install-a-minecraft-modpack