Commit graph

9 commits

Author SHA1 Message Date
Ben Lubar
2f3e4a64be add og:image:alt for media attachments in embeds () 2019-05-18 20:57:45 +02:00
Eugen Rochko
f89c595ea0
Add admin setting to enable OG previews for sensitive media () 2018-07-06 02:15:56 +02:00
Eugen Rochko
a568e3ca8e
Revert , hide sensitive text/images from OpenGraph previews ()
Display summary of attachments in description, and mark up content
warning if present, e.g.:

    Attached: 3 images · Content warning: Dota 2

When text is not supposed to be hidden, it looks more like:

    Attached: 3 images

    Here is the text of the toot

With , multilinguagility should be assured...
2018-03-18 20:33:07 +01:00
Eugen Rochko
9dbae6e8a1
Save video metadata and improve video OpenGraph tags ()
* Save metadata from video attachments, put correct dimensions into OG tags

* Add twitter:player for videos

* Fix code style and test
2018-02-16 07:22:20 +01:00
Eugen Rochko
1122579216
Do not hide NSFW media/CW'd text in OpenGraph tags ()
Reasoning: HTML title tag affects everyone. But OpenGraph only affects
when somebody is deliberately sharing the content, usually in an
environment where such content is expected. Hiding the content in
OpenGraph tags results in deceitful previews which inhibit the
shareability of the post.

Example: Somebody writes a clever post about politics but kindly
puts a "uspol" content warning on it. Mastodon users are thankful,
but sharing this post on another platform results in non-Mastodon
users believing the entire contents of the post is "uspol" and not
clicking through/reading and re-sharing.
2018-02-16 04:40:53 +01:00
Eugen Rochko
b406e3cc4c Fix - Use summary_large_image only with media attachments () 2017-10-04 19:06:23 +02:00
Yamagishi Kazutoshi
dcf1139ebd Do not add image size without meta to OGP (regression from ) () 2017-09-18 15:00:29 +02:00
Eugen Rochko
8f8e677630 Clean up and improve generated OpenGraph tags ()
- Return all images as og:image
- Return videos as og:image (preview) and og:video
- Return profile:username on profiles
2017-09-12 05:39:38 +02:00
Matt Jankowski
73b0af5c93 Simplify the og:image and og:description code in stream_entries/show () 2017-04-16 16:38:02 +02:00