1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Don't resize remote actor images

Use their own size. In the future we may imagine resizing remote images
on demand like classic CDNs
This commit is contained in:
Chocobozzz 2024-09-12 08:46:08 +02:00
parent baefe61cff
commit 565a11d8d3
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 22 additions and 16 deletions

View file

@ -1,5 +1,4 @@
import { CONFIG } from '@server/initializers/config.js'
import { ACTOR_IMAGES_SIZE } from '@server/initializers/constants.js'
import { ActorImageModel } from '@server/models/actor/actor-image.js'
import { MActorImage } from '@server/types/models/index.js'
import { AbstractPermanentFileCache } from './shared/index.js'
@ -22,6 +21,6 @@ export class AvatarPermanentFileCache extends AbstractPermanentFileCache<MActorI
}
}
return ACTOR_IMAGES_SIZE[image.type][0]
return undefined
}
}

View file

@ -118,7 +118,7 @@ export abstract class AbstractPermanentFileCache <M extends ImageModel> {
private downloadImage (options: {
fileUrl: string
filename: string
size: { width: number, height: number }
size?: { width: number, height: number }
}) {
const downloaderOptions = {
url: options.fileUrl,