diff options
author | Matthew Hodgson <matthew@matrix.org> | 2016-04-03 23:57:05 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2016-04-03 23:57:05 +0100 |
commit | cf51c4120e79a59a798fcf88c5c7d9f95dc6e76d (patch) | |
tree | 04388da1e91577fa0eb60244152b579fee838d3a /synapse/rest/media/v1 | |
parent | char encoding (diff) | |
download | synapse-cf51c4120e79a59a798fcf88c5c7d9f95dc6e76d.tar.xz |
report image size (bytewise) in OG meta
Diffstat (limited to 'synapse/rest/media/v1')
-rw-r--r-- | synapse/rest/media/v1/preview_url_resource.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/rest/media/v1/preview_url_resource.py b/synapse/rest/media/v1/preview_url_resource.py index ff522c5fb8..f5ec32d8f2 100644 --- a/synapse/rest/media/v1/preview_url_resource.py +++ b/synapse/rest/media/v1/preview_url_resource.py @@ -131,6 +131,7 @@ class PreviewUrlResource(BaseMediaResource): self.server_name, media_info['filesystem_id'] ), "og:image:type": media_info['media_type'], + "matrix:image:size": media_info['media_length'], } if dims: @@ -269,6 +270,7 @@ class PreviewUrlResource(BaseMediaResource): self.server_name, image_info['filesystem_id'] ) og["og:image:type"] = image_info['media_type'] + og["matrix:image:size"] = image_info['media_length'] else: del og["og:image"] |