about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorBen Lubar <ben.lubar@gmail.com>2019-05-18 13:57:45 -0500
committerEugen Rochko <eugen@zeonfederated.com>2019-05-18 20:57:45 +0200
commit2f3e4a64be4b98167a5690fdd2f969f1b7f7820c (patch)
tree3f6d1395fb253661dec8cd4dba306a29c03913bc /app
parent6fe474837c6454ebd03ba7fa0c845a2dde5734d1 (diff)
add og:image:alt for media attachments in embeds (#10779)
Diffstat (limited to 'app')
-rw-r--r--app/views/stream_entries/_og_image.html.haml2
1 files changed, 2 insertions, 0 deletions
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))