Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] OG Image를 가져오는 경로를 절대 경로로 수정 #904

Merged
merged 4 commits into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/techpick/src/app/(unsigned)/share/[uuid]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ const EmptyPickRecordImage = dynamic(
}
);

// TODO:
// 해당 코드는 api를 쓰는 방식이 아닌,
// https://nextjs.org/docs/14/app/api-reference/file-conventions/metadata/opengraph-image#generate-images-using-code-js-ts-tsx
// 에서 나오는 방식으로 변경해야합니다.
export async function generateMetadata(
{
params,
Expand Down
8 changes: 7 additions & 1 deletion frontend/techpick/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ export const metadata: Metadata = {
icon: '/favicon.ico',
},
openGraph: {
images: `/image/og_image.png`,
images: [
{
url: `${process.env.NEXT_PUBLIC_IMAGE_URL}/image/og_image.png`,
width: 1200,
height: 630,
},
],
},
};

Expand Down
Loading