diff options
author | Brion Vibber <brion@status.net> | 2010-11-08 17:22:01 -0800 |
---|---|---|
committer | Brion Vibber <brion@status.net> | 2010-11-08 17:22:01 -0800 |
commit | 6d7f02ff31c6c929223030b051541b1bf103f3a8 (patch) | |
tree | 1c265f68c64505dc566f9e459a17984a408c9f1f /actions/oembed.php | |
parent | c36fecb79431218016615cde45215337d67fee67 (diff) |
Pass file attachment thumbnails along with oEmbed data.
Diffstat (limited to 'actions/oembed.php')
-rw-r--r-- | actions/oembed.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/oembed.php b/actions/oembed.php index da3aa0c71..11d814583 100644 --- a/actions/oembed.php +++ b/actions/oembed.php @@ -112,6 +112,12 @@ class OembedAction extends Action //$oembed['width']= //$oembed['height']= $oembed['url']=$attachment->url; + $thumb = $attachment->getThumbnail(); + if ($thumb) { + $oembed['thumbnail_url'] = $thumb->url; + $oembed['thumbnail_width'] = $thumb->width; + $oembed['thumbnail_height'] = $thumb->height; + } }else{ $oembed['type']='link'; $oembed['url']=common_local_url('attachment', |