report image size (bytewise) in OG meta

This commit is contained in:
Matthew Hodgson 2016-04-03 23:57:05 +01:00
parent 0834b152fb
commit cf51c4120e
1 changed files with 2 additions and 0 deletions

View File

@ -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"]