Skip to content

Commit

Permalink
add og:image:alt for media attachments in embeds (mastodon#10779)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar authored and hiyuki2578 committed Oct 2, 2019
1 parent bf4c5a5 commit 811396d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/views/stream_entries/_og_image.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 811396d

Please sign in to comment.