Skip to content

Commit 22532c6

Browse files
committed
chore(website): switch OG image to PNG and refresh design
SVG OG images aren't reliably rendered by Facebook/LinkedIn/Slack. Replace with a 1200x630 PNG using the site's brand tokens, and add og:image:type/width/height meta tags for crawlers.
1 parent 6a44d69 commit 22532c6

3 files changed

Lines changed: 4 additions & 15 deletions

File tree

website/public/og-image.png

57.1 KB
Loading

website/public/og-image.svg

Lines changed: 0 additions & 14 deletions
This file was deleted.

website/src/layouts/Layout.astro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const basePath = import.meta.env.BASE_URL.endsWith("/")
2626
: `${import.meta.env.BASE_URL}/`;
2727
const site = Astro.site ?? new URL("https://shipnode.dev");
2828
const canonicalUrl = canonical ?? new URL(Astro.url.pathname, site).toString();
29-
const socialImage = image ?? new URL(`${basePath}og-image.svg`, site).toString();
29+
const socialImage = image ?? new URL(`${basePath}og-image.png`, site).toString();
3030
const defaultStructuredData = {
3131
"@context": "https://schema.org",
3232
"@type": "SoftwareApplication",
@@ -75,6 +75,9 @@ const jsonLd = structuredData ?? defaultStructuredData;
7575
<meta property="og:site_name" content="ShipNode" />
7676
<meta property="og:locale" content="en_US" />
7777
<meta property="og:image" content={socialImage} />
78+
<meta property="og:image:type" content="image/png" />
79+
<meta property="og:image:width" content="1200" />
80+
<meta property="og:image:height" content="630" />
7881
<meta property="og:image:alt" content={imageAlt} />
7982

8083
<!-- Twitter -->

0 commit comments

Comments
 (0)