mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
FIX: Add thumbnails for Vimeo unlisted lazy videos (#21343)
Previously, the image for the thumbnail was taken from the oembed endpoint. Since these images are not available for some unlisted videos, the thumbnails are now sourced from Open Graph instead.
This commit is contained in:
@ -19,7 +19,7 @@ class Onebox::Engine::VimeoOnebox
|
||||
iframe_id = iframe_src.sub("https://player.vimeo.com/video/", "")
|
||||
end
|
||||
|
||||
thumbnail_url = "https://vumbnail.com/#{oembed_data[:video_id]}.jpg"
|
||||
thumbnail_url = get_opengraph.image
|
||||
escaped_title = ERB::Util.html_escape(og_data.title)
|
||||
|
||||
<<~HTML
|
||||
|
Reference in New Issue
Block a user