From b770c30391d0294a498d73e6a5272fb437291833 Mon Sep 17 00:00:00 2001 From: David Taylor Date: Thu, 11 Feb 2021 17:50:42 +0000 Subject: [PATCH] FEATURE: Allow onebox images to be used as topic thumbnails (#12050) Still excludes GitHub avatars. Those were the original reason for adding this broad exclusion. Context at https://meta.discourse.org/t/165713/4 If we find more oneboxes which are unsuitable for thumbnails, we can add them to this selector. --- lib/cooked_post_processor.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index 74789f4891d266..a3046fbb3dbacb 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -209,8 +209,8 @@ def extract_images_for_post @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") + # minus github onebox profile images + @doc.css(".onebox.githubfolder img") end def oneboxed_images