From 2f3e4a64be4b98167a5690fdd2f969f1b7f7820c Mon Sep 17 00:00:00 2001 From: Ben Lubar Date: Sat, 18 May 2019 13:57:45 -0500 Subject: [PATCH] add og:image:alt for media attachments in embeds (#10779) --- app/views/stream_entries/_og_image.html.haml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/stream_entries/_og_image.html.haml b/app/views/stream_entries/_og_image.html.haml index e1b977da36..67f9274b6f 100644 --- a/app/views/stream_entries/_og_image.html.haml +++ b/app/views/stream_entries/_og_image.html.haml @@ -7,6 +7,8 @@ - unless media.file.meta.nil? = opengraph 'og:image:width', media.file.meta.dig('original', 'width') = opengraph 'og:image:height', media.file.meta.dig('original', 'height') + - if media.description.present? + = opengraph 'og:image:alt', media.description - elsif media.video? || media.gifv? - player_card = true = opengraph 'og:image', full_asset_url(media.file.url(:small))