From c5c8f52c91c892df918a74a55d9c6f455dcf79c7 Mon Sep 17 00:00:00 2001 From: Sam Becker Date: Thu, 28 Dec 2023 15:42:30 -0500 Subject: [PATCH] Warm og images for individual photos --- src/app/(static)/p/[photoId]/layout.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/(static)/p/[photoId]/layout.tsx b/src/app/(static)/p/[photoId]/layout.tsx index 4fdde655..c788e081 100644 --- a/src/app/(static)/p/[photoId]/layout.tsx +++ b/src/app/(static)/p/[photoId]/layout.tsx @@ -64,6 +64,9 @@ export default async function PhotoPage({ const isPhotoFirst = photos.findIndex(p => p.id === photoId) === 0; + // Warm OG image without waiting on response + fetch(absolutePathForPhotoImage(photo)); + return <> {children}