metadataBase Not working
Unanswered
Red carpenter ant posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Red carpenter antOP
what am I doing wrong? The
PS: this screenshot is from
I have
Next version: v14.0.1
metadataBase
error won't go. Even in vercel deployment log.PS: this screenshot is from
/app/(website)/layout.tsx
I have
opengraph-image.jpg
in /app
Next version: v14.0.1
![Image](https://cdn.discordapp.com/attachments/1169977349236863088/1169977350000230400/CleanShot_2023-11-03_at_17.png?ex=65575d51&is=6544e851&hm=82ef25a226d7ab6e5f656242e7e22e2655c5f21f8908872722ba78f4d2f9e47c&)
9 Replies
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Red carpenter antOP
bump
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Asian black bear
Hello, did you find a solution?
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Red carpenter antOP
nope
![Avatar](https://cdn.discordapp.com/avatars/184479429404262410/a_35db4fb943e84d39bb02d6ec0f1d0b7e.gif?size=256)
DirtyCajunRice | AppDir
you also need to set it in opengraph.
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Asian black bear
like how to set it in opengraph? In the opengraph-image.js file?
![Avatar](https://cdn.discordapp.com/embed/avatars/3.png)
Red carpenter antOP
yeah, I am using the image. the docs doesn't explain it well.
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Asian black bear
For me I only set up the opengraph in the generateMetadata function and I deleted the opengraph-image.js file.
openGraph: {
title: data[0].attributes.title,
url:
images: {
url:
},
type: "website",
},
};
title: data[0].attributes.title,
url:
${process.env.NEXT_PUBLIC_BASE_URL}/${params.lang}/post/${params.slug}
,images: {
url:
https://my_api.com${data[0].attributes.main_image.data.attributes.url}
,},
type: "website",
},
};
Something like that. I wish it will help you. I didn't find any other solution.