]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/controllers/lazy-static.ts
Merge branch 'release/4.2.0' into develop
[github/Chocobozzz/PeerTube.git] / server / controllers / lazy-static.ts
index 632e4dcd8d6f5b7f5d72368541e6cb6e6f3b014c..55bf026601750d99beeb718f6bb6da695bf5c658 100644 (file)
@@ -1,5 +1,5 @@
-import * as cors from 'cors'
-import * as express from 'express'
+import cors from 'cors'
+import express from 'express'
 import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
 import { HttpStatusCode } from '../../shared/models/http/http-error-codes'
 import { logger } from '../helpers/logger'
@@ -64,7 +64,15 @@ async function getActorImage (req: express.Request, res: express.Response, next:
     logger.info('Lazy serve remote actor image %s.', image.fileUrl)
 
     try {
-      await pushActorImageProcessInQueue({ filename: image.filename, fileUrl: image.fileUrl, type: image.type })
+      await pushActorImageProcessInQueue({
+        filename: image.filename,
+        fileUrl: image.fileUrl,
+        size: {
+          height: image.height,
+          width: image.width
+        },
+        type: image.type
+      })
     } catch (err) {
       logger.warn('Cannot process remote actor image %s.', image.fileUrl, { err })
       return res.status(HttpStatusCode.NOT_FOUND_404).end()