mirror of
https://mau.dev/maunium/synapse.git
synced 2024-08-25 03:35:28 +00:00
report image size (bytewise) in OG meta
This commit is contained in:
parent
0834b152fb
commit
cf51c4120e
@ -131,6 +131,7 @@ class PreviewUrlResource(BaseMediaResource):
|
|||||||
self.server_name, media_info['filesystem_id']
|
self.server_name, media_info['filesystem_id']
|
||||||
),
|
),
|
||||||
"og:image:type": media_info['media_type'],
|
"og:image:type": media_info['media_type'],
|
||||||
|
"matrix:image:size": media_info['media_length'],
|
||||||
}
|
}
|
||||||
|
|
||||||
if dims:
|
if dims:
|
||||||
@ -269,6 +270,7 @@ class PreviewUrlResource(BaseMediaResource):
|
|||||||
self.server_name, image_info['filesystem_id']
|
self.server_name, image_info['filesystem_id']
|
||||||
)
|
)
|
||||||
og["og:image:type"] = image_info['media_type']
|
og["og:image:type"] = image_info['media_type']
|
||||||
|
og["matrix:image:size"] = image_info['media_length']
|
||||||
else:
|
else:
|
||||||
del og["og:image"]
|
del og["og:image"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user