Navigation Menu

Skip to content

Commit

Permalink
FEATURE: Allow onebox images to be used as topic thumbnails (#12050)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
davidtaylorhq committed Feb 11, 2021
1 parent 2068780 commit b770c30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cooked_post_processor.rb
Expand Up @@ -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
Expand Down

1 comment on commit b770c30

@discoursebot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Discourse Meta. There might be relevant details there:

https://meta.discourse.org/t/using-onebox-images-for-topic-thumbnails/165713/20

Please sign in to comment.