Skip to content

Commit 55336ba

Browse files
captnCCjohanneskees
andauthored
fix: iMessage Preview displaying multiple images (#584)
Co-authored-by: johanneskees <johannes@lets-byte.it>
1 parent 60ccc12 commit 55336ba

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/runtime/shared.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ export function generateMeta(url: OgImagePrebuilt['url'] | string, resolvedOptio
1515

1616
const meta: ResolvableMeta[] = []
1717

18-
if (!isTwitterOnly) {
19-
meta.push({ property: 'og:image', content: url })
20-
meta.push({ property: 'og:image:type', content: () => `image/${getExtension(toValue(url) as string) || resolvedOptions.extension}` })
21-
}
22-
2318
if (includeTwitter) {
2419
meta.push({ name: 'twitter:card', content: 'summary_large_image' })
2520
meta.push({ name: 'twitter:image', content: url })
2621
meta.push({ name: 'twitter:image:src', content: url })
2722
}
2823

24+
if (!isTwitterOnly) {
25+
meta.push({ property: 'og:image', content: url })
26+
meta.push({ property: 'og:image:type', content: () => `image/${getExtension(toValue(url) as string) || resolvedOptions.extension}` })
27+
}
28+
2929
if (resolvedOptions.width) {
3030
if (!isTwitterOnly)
3131
meta.push({ property: 'og:image:width', content: resolvedOptions.width })

0 commit comments

Comments
 (0)