Browse Source

add og:image:alt for media attachments in embeds (#10779)

Ben Lubar 5 months ago
parent
commit
d587a943a5
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app/views/stream_entries/_og_image.html.haml

+ 2
- 0
app/views/stream_entries/_og_image.html.haml View File

@@ -7,6 +7,8 @@
7 7
       - unless media.file.meta.nil?
8 8
         = opengraph 'og:image:width', media.file.meta.dig('original', 'width')
9 9
         = opengraph 'og:image:height', media.file.meta.dig('original', 'height')
10
+      - if media.description.present?
11
+        = opengraph 'og:image:alt', media.description
10 12
     - elsif media.video? || media.gifv?
11 13
       - player_card = true
12 14
       = opengraph 'og:image', full_asset_url(media.file.url(:small))

Loading…
Cancel
Save