Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Register
Sign in
Toggle navigation
Menu
Open sidebar
Tiger Ton
mastodon
Commits
d587a943
Commit
d587a943
authored
5 years ago
by
Ben Lubar
Committed by
Eugen Rochko
5 years ago
Browse files
Options
Download
Email Patches
Plain Diff
add og:image:alt for media attachments in embeds (#10779)
parent
3c27687a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/views/stream_entries/_og_image.html.haml
+2
-0
app/views/stream_entries/_og_image.html.haml
with
2 additions
and
0 deletions
+2
-0
app/views/stream_entries/_og_image.html.haml
+
2
-
0
View file @
d587a943
...
...
@@ -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
))
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets