From ad5dadedf693ebecce90a11171ac0a7220b436a4 Mon Sep 17 00:00:00 2001 From: Valery Melou Date: Mon, 5 Aug 2024 00:33:07 +0100 Subject: [PATCH] fix: article open graph image --- libs/shared/seo/src/lib/metadata.service.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/shared/seo/src/lib/metadata.service.ts b/libs/shared/seo/src/lib/metadata.service.ts index 43684d8..c2ce594 100644 --- a/libs/shared/seo/src/lib/metadata.service.ts +++ b/libs/shared/seo/src/lib/metadata.service.ts @@ -71,6 +71,10 @@ export class MetadataService { } private buildImageUrl(image: string): string { + if (image.startsWith('//')) { + return `https:${image}`; + } + return image.startsWith('http') || image.startsWith('//') ? image : this.window.location.origin + image;