From f1111c6f7f74e2998390e5beea6c0bb1f0897378 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Sun, 9 Feb 2025 10:09:15 -0800 Subject: [PATCH] misc: switch from thumbnail url to post url by default, close #475, close #487 --- src/lib/components/lemmy/post/helpers.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/components/lemmy/post/helpers.ts b/src/lib/components/lemmy/post/helpers.ts index 47f60c09..4f61ddf9 100644 --- a/src/lib/components/lemmy/post/helpers.ts +++ b/src/lib/components/lemmy/post/helpers.ts @@ -14,8 +14,9 @@ export const bestImageURL = ( compact: boolean = true, width: number = 1024, ) => { - if (post.thumbnail_url) return optimizeImageURL(post.thumbnail_url, width) - else if (post.url) return optimizeImageURL(post.url, width) + if (post.url) return optimizeImageURL(post.url, width) + else if (post.thumbnail_url) + return optimizeImageURL(post.thumbnail_url, width) return post.url ?? '' }