resize opengraph image in generateMetadata
Unanswered
Transvaal lion posted this in #help-forum
Transvaal lionOP
My og image size is 3813 × 6158 pixels and I need it to fit in my open graph image area without getting cut off?
This is my generate function where I am setting the width and height but my image is still being really cut off
export async function generateMetadata({ params }: Props): Promise<Metadata> {
const id = params.id;
const { data, error } = await supabase
.from("my_table")
.select("*")
.eq("cert_id", id)
.single();
let openGraphFrontImage = data.image_2d_front;
return {
title: data?.name,
description: `Claim page for ${data.name}`,
openGraph: {
title: data?.name,
description: `Claim page for ${data.name}`,
images: [
{
url: openGraphFrontImage,
width: 50,
height: 50,
alt: `${data.name}`,
},
],
},
};
}This is my generate function where I am setting the width and height but my image is still being really cut off