From 468c7d4bd52f93327d7f737eb22c7737806ef497 Mon Sep 17 00:00:00 2001 From: fflorent <florent.git@zeteo.me> Date: Mon, 7 Oct 2024 14:47:10 +0200 Subject: [PATCH] Set icon dimensions --- app/server/lib/sendAppPage.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/server/lib/sendAppPage.ts b/app/server/lib/sendAppPage.ts index 314486c0..95c38282 100644 --- a/app/server/lib/sendAppPage.ts +++ b/app/server/lib/sendAppPage.ts @@ -297,8 +297,11 @@ function getPageMetadataHtmlSnippet(req: express.Request, config: GristLoadConfi const icon = maybeDoc?.options?.icon ?? new URL('icons/grist.png', staticBaseUrl).href; const escapedIcon = handlebars.Utils.escapeExpression(icon); + const iconSize = '100'; metadataElements.push(`<meta name="thumbnail" content="${escapedIcon}">`); metadataElements.push(`<meta property="og:image" content="${escapedIcon}">`); + metadataElements.push(`<meta property="og:image:width" content="${iconSize}">`); + metadataElements.push(`<meta property="og:image:height" content="${iconSize}">`); metadataElements.push(`<meta name="twitter:image" content="${escapedIcon}">`); const title = (getPageTitle(config) ?? translate(req, 'Welcome')) + getPageTitleSuffix(config);