Skip to content

Commit 6e1edc1

Browse files
authored
fix: warn when using .svg in meta.image (#377)
1 parent 3125547 commit 6e1edc1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: packages/astro/src/default/components/MetaTags.astro

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ if (imageUrl?.startsWith('/') || imageUrl?.startsWith('.')) {
1818
}
1919
2020
imageUrl ??= readLogoFile('logo', true);
21+
if (imageUrl?.endsWith('.svg')) {
22+
console.warn(`Using a SVG open graph image "${imageUrl}". This is not supported by most social platforms.
23+
You should rather set "meta.image" to a raster image (PNG, WEBP).`);
24+
}
2125
---
2226

2327
<meta charset="UTF-8" />

0 commit comments

Comments
 (0)