Using onebox images for topic thumbnails

I am certainly open to improvements here. I know @merefield is also interested in this logic. The change would be needed in core, rather than a plugin, so I’ll split this out into its own topic.

Here is the existing logic:

https://github.com/discourse/discourse/blob/master/lib/cooked_post_processor.rb#L201-L214

Maybe we could add a .no-thumbnail class to certain kinds of onebox (e.g. GitHub), and then teach Discourse to only ignore those, while keeping other onebox images.

Going to put pr-welcome on this, but be sure to lay out a plan in this topic before doing any substantial work.

5 Likes