summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--synapse/rest/media/v1/preview_url_resource.py2
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"]