Prefer higher resolution link preview images
See [#5000][0]. [0]: https://github.com/signalapp/Signal-Desktop/pull/5000
This commit is contained in:
parent
ea7a5449f1
commit
e8fb835857
2 changed files with 64 additions and 1 deletions
|
@ -354,9 +354,10 @@ const parseMetadata = (
|
|||
const rawImageHref =
|
||||
getOpenGraphContent(document, ['og:image', 'og:image:url']) ||
|
||||
getLinkHrefAttribute(document, [
|
||||
'apple-touch-icon',
|
||||
'apple-touch-icon-precomposed',
|
||||
'shortcut icon',
|
||||
'icon',
|
||||
'apple-touch-icon',
|
||||
]);
|
||||
const imageUrl = rawImageHref ? maybeParseUrl(rawImageHref, href) : null;
|
||||
const imageHref = imageUrl ? imageUrl.href : null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue