From b406e3cc4cfc1b51a276d9e0e8a9910f1ca529e2 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 4 Oct 2017 19:06:23 +0200 Subject: [PATCH] Fix #5050 - Use summary_large_image only with media attachments (#5219) --- app/views/stream_entries/_og_image.html.haml | 2 ++ app/views/stream_entries/show.html.haml | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/stream_entries/_og_image.html.haml b/app/views/stream_entries/_og_image.html.haml index b5058583..1056c174 100644 --- a/app/views/stream_entries/_og_image.html.haml +++ b/app/views/stream_entries/_og_image.html.haml @@ -17,7 +17,9 @@ - unless media.file.meta.nil? = opengraph 'og:video:width', media.file.meta['small']['width'] = opengraph 'og:video:height', media.file.meta['small']['height'] + = opengraph 'twitter:card', 'summary_large_image' - else = opengraph 'og:image', full_asset_url(account.avatar.url(:original)) = opengraph 'og:image:width', '120' = opengraph 'og:image:height','120' + = opengraph 'twitter:card', 'summary' diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml index 1bb8a32b..42806993 100644 --- a/app/views/stream_entries/show.html.haml +++ b/app/views/stream_entries/show.html.haml @@ -14,8 +14,6 @@ = render 'stream_entries/og_description', activity: @stream_entry.activity = render 'stream_entries/og_image', activity: @stream_entry.activity, account: @account - = opengraph 'twitter:card', 'summary_large_image' - - if show_landing_strip? = render partial: 'shared/landing_strip', locals: { account: @stream_entry.account }