]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/components/post/post-listing.tsx
Update post listing to prefer local image when available (#1858)
[lemmy-ui.git] / src / shared / components / post / post-listing.tsx
index eb4dc8d974807547758e5d785ece3debf0510c35..30b18659fcd67ebcee26abc44fa4321b4b10f9c6 100644 (file)
@@ -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;
     }