Browse Source

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

feature_machine_registration_task
Ben Lubar Eugen Rochko 1 year 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 @@
- 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))


Loading…
Cancel
Save