X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server%2Fcontrollers%2Flazy-static.ts;h=55bf026601750d99beeb718f6bb6da695bf5c658;hb=1808a1f8e4b7b102823492a2007a46929aebf189;hp=9a7dacba049e86d3eb546dcc4bc91369ff591333;hpb=79db409a41bd28fd2773626c9a93b5d326a38bc0;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server/controllers/lazy-static.ts b/server/controllers/lazy-static.ts index 9a7dacba0..55bf02660 100644 --- a/server/controllers/lazy-static.ts +++ b/server/controllers/lazy-static.ts @@ -1,7 +1,7 @@ -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/core-utils/miscs/http-error-codes' +import { HttpStatusCode } from '../../shared/models/http/http-error-codes' import { logger } from '../helpers/logger' import { LAZY_STATIC_PATHS, STATIC_MAX_AGE } from '../initializers/constants' import { VideosCaptionCache, VideosPreviewCache } from '../lib/files-cache' @@ -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()