From 6dffcf3cb36a0dab6549ee249fe426b4ee931b06 Mon Sep 17 00:00:00 2001 From: tanishqmanuja Date: Wed, 20 Sep 2023 15:02:10 +0530 Subject: [PATCH] fix: og image src related to: 3e0109c12e708351df60df7b938e8bcc07807540 --- src/layouts/PostDetails.astro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layouts/PostDetails.astro b/src/layouts/PostDetails.astro index 6552f3eb7..9047ef772 100644 --- a/src/layouts/PostDetails.astro +++ b/src/layouts/PostDetails.astro @@ -18,8 +18,10 @@ const { title, author, description, ogImage, canonicalURL, pubDatetime, tags } = const { Content } = await post.render(); -const ogUrl = new URL(ogImage ? ogImage : `${post.slug}.png`, Astro.url.origin) - .href; +const ogUrl = new URL( + ogImage ? ogImage.src : `${post.slug}.png`, + Astro.url.origin +).href; ---