Page MenuHomePhabricator

Export file thumbnail, video preview via Open Graph meta elements as Facebook posting helper
Open, NormalPublic

Description

Similar to T27854 (oEmbed export/discovery), it should be useful to expose images and video files via Open Graph meta tags, which tools like Facebook can pick up when someone posts a link.

For images and video, exposing a thumbnail at some defaultish default width/height should help:

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

We'll have to pick a default size, I suppose; per docs should be bigger than 50x50, with maximum aspect ratio of 3:1 (???)

For video, there are some examples of multi-format info:

<html xmlns:og="http://ogp.me/ns#"> 
    <head>
        ...
        [REQUIRED TAGS]
        <meta property="og:video" content="http://example.com/awesome.swf" />
        <meta property="og:video:height" content="640" />
        <meta property="og:video:width" content="385" />
        <meta property="og:video:type" content="application/x-shockwave-flash" />
        <meta property="og:video" content="http://example.com/html5.mp4" />
        <meta property="og:video:type" content="video/mp4" />
        <meta property="og:video" content="http://example.com/fallback.vid" />
        <meta property="og:video:type" content="text/html" />
        ...
    </head>

however if we're not generating H.264 .mp4 output for videos, we might be stuck with just a link if it doesn't happen to accept WebM/ogg; it kinda looks like that fallback is for linking not iframe embedding.

Audio files seem to be handled similar to videos; depending on what clients claim to support they may or may not actually take an ogg vorbis file, but mp3 is specifically called out as supported.

Some additional file metadata such as location could probably also be extracted and exposed, if necessary/desired.

See Also:
T32113

Details

Reference
bz31338

Related Objects

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz31338.
bzimport added a subscriber: Unknown Object (MLST).
brion created this task.Oct 4 2011, 12:41 AM

leo_wallentin wrote:

This extension provides some og tags: http://www.mediawiki.org/wiki/Extension:OpenGraphMeta

jeremyb-phone set Security to None.Apr 2 2015, 6:48 PM
jeremyb-phone added a subscriber: jeremyb.
jayvdb added a subscriber: jayvdb.Apr 3 2015, 4:26 AM

+Cc per https://lists.wikimedia.org/pipermail/wikitech-l/2015-April/081459.html and replies.

MaxSem, would metadata for images be in scope for the PageImages extension?

This comment was removed by MarkAHershberger.
Tgr updated the task description. (Show Details)Jun 20 2015, 1:27 AM
putnik added a subscriber: putnik.Jan 26 2017, 10:53 AM
Teles awarded a token.Jan 14 2018, 1:04 PM
Teles added a subscriber: Teles.
Krinkle removed a subscriber: Krinkle.Feb 2 2018, 6:17 AM
gpaumier removed a subscriber: gpaumier.Jul 18 2018, 5:57 PM