From: Lemmus.org <137361180+lemmus-org@users.noreply.github.com> Date: Mon, 10 Jul 2023 14:22:12 +0000 (-0700) Subject: Update post listing to prefer local image when available (#1858) X-Git-Url: http://these/git/%22https:/image.com/%7B%60%24%7BghostArchiveUrl%7D/%24%7Bargs.pageFn.jump%20n%7D?a=commitdiff_plain;h=1bd705d7bc446b729510ab0b23a8c42e99c5cfe3;p=lemmy-ui.git Update post listing to prefer local image when available (#1858) --- diff --git a/src/shared/components/post/post-listing.tsx b/src/shared/components/post/post-listing.tsx index eb4dc8d..30b1865 100644 --- a/src/shared/components/post/post-listing.tsx +++ b/src/shared/components/post/post-listing.tsx @@ -310,16 +310,10 @@ export class PostListing extends Component<PostListingProps, PostListingState> { const url = post.url; const thumbnail = post.thumbnail_url; - if (url && isImage(url)) { - if (url.includes("pictrs")) { - return url; - } else if (thumbnail) { - return thumbnail; - } else { - return url; - } - } else if (thumbnail) { + if (thumbnail) { return thumbnail; + } else if (url && isImage(url)) { + return url; } else { return undefined; }