From d587a943a549d7ba5bb8433401390ac665bbdf17 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 e1b977da3..67f9274b6 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))