From a6bfa295ce182ce999029c099ecfe695cb734a69 Mon Sep 17 00:00:00 2001 From: Harold Anderson Date: Sun, 16 Jun 2024 12:20:01 -0700 Subject: [PATCH] changed metadata.astro to allow jpg files for LinkedIn --- src/components/common/Metadata.astro | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/common/Metadata.astro b/src/components/common/Metadata.astro index a4c573e..e54d6d1 100644 --- a/src/components/common/Metadata.astro +++ b/src/components/common/Metadata.astro @@ -63,6 +63,16 @@ const seoProps: AstroSeoProps = merge( twitter: twitter, } ); + +const adaptedOpenGraph = await adaptOpenGraphImages(seoProps?.openGraph, Astro.site); + +if (adaptedOpenGraph.images && adaptedOpenGraph.images.length) { + adaptedOpenGraph.images = adaptedOpenGraph.images.map((image) => ({ + url: image.url, + 'og:image:width': image.width, + 'og:image:height': image.height, + })); +} --- - +