Skip to content

Commit 919476b

Browse files
committed
fix: logo type
1 parent 2c2f700 commit 919476b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/routes/og.common.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const logo = logos.dark || logos.light
3131

3232
const logoSrc = logo
3333
? process.env.NODE_ENV === 'development'
34-
? (logo.src.replace(/\?.*/, '').replace('/@fs', ''))
34+
? (logo.src.replace(/\?.*/, '').replace('/@fs', '')).split('?')[0]
3535
: (logo.src.replace('/', 'dist/'))
3636
: ''
3737

@@ -53,11 +53,10 @@ export async function generateOGImageMarkup(props: Route) {
5353
/>
5454
<div tw="flex items-center justify-start w-full px-18" style="gap: 20px">
5555
<div tw="self-start flex justify-center items-center">
56-
${logo && `<img
56+
<img
5757
tw="w-28 h-28"
58-
src="data:image/${logo.format};base64,${logoBase64}"
59-
alt="logo"
60-
/>`}
58+
src="data:image/${logo?.format === 'svg' ? 'svg+xml' : logo?.format};base64,${logoBase64}"
59+
/>
6160
</div>
6261
6362
<div tw="flex flex-col" style="gap: 10px">

0 commit comments

Comments
 (0)