From: Ben Lubar Date: Sat, 18 May 2019 18:57:45 +0000 (-0500) Subject: add og:image:alt for media attachments in embeds (#10779) X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=2f3e4a64be4b98167a5690fdd2f969f1b7f7820c;p=mastodon.git add og:image:alt for media attachments in embeds (#10779) --- 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))