]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/models/activitypub/actor.ts
Add size info in db for actor images
[github/Chocobozzz/PeerTube.git] / server / models / activitypub / actor.ts
index 6595f11e2bb333a6911f176e17241d5c63da5419..a6c724f26634bf5876c216048feb8a1c55d016dc 100644 (file)
@@ -570,16 +570,21 @@ export class ActorModel extends Model {
       icon = {
         type: 'Image',
         mediaType: MIMETYPES.IMAGE.EXT_MIMETYPE[extension],
+        height: this.Avatar.height,
+        width: this.Avatar.width,
         url: this.getAvatarUrl()
       }
     }
 
     if (this.bannerId) {
-      const extension = extname((this as MActorAPChannel).Banner.filename)
+      const banner = (this as MActorAPChannel).Banner
+      const extension = extname(banner.filename)
 
       image = {
         type: 'Image',
         mediaType: MIMETYPES.IMAGE.EXT_MIMETYPE[extension],
+        height: banner.height,
+        width: banner.width,
         url: this.getBannerUrl()
       }
     }