UX: Do not use small onebox images as post/topic images

UX: Do not use small onebox images as post/topic images

diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb
index d6fb05a..258b791 100644
--- a/lib/cooked_post_processor.rb
+++ b/lib/cooked_post_processor.rb
@@ -216,7 +216,11 @@ class CookedPostProcessor
     # minus images inside quotes
     @doc.css(".quote img") -
     # minus onebox site icons
-    @doc.css("img.site-icon")
+    @doc.css("img.site-icon") -
+    # minus onebox avatars
+    @doc.css("img.onebox-avatar") -
+    # minus small onebox images (large images are .aspect-image-full-size)
+    @doc.css(".onebox .aspect-image img")
   end
 
   def oneboxed_images

GitHub sha: 956d15d1

2 Likes