fix(server): disable heif security limit (#29954)

disable security limit
This commit is contained in:
Mert 2026-07-16 05:40:33 -04:00 committed by GitHub
parent d8ed7d7bb9
commit d2744f52b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -411,7 +411,7 @@ export class MediaRepository {
}
async getImageMetadata(input: string | Buffer): Promise<ImageDimensions & { isTransparent: boolean }> {
const { width = 0, height = 0, hasAlpha = false } = await sharp(input).metadata();
const { width = 0, height = 0, hasAlpha = false } = await sharp(input, { unlimited: true }).metadata();
return { width, height, isTransparent: hasAlpha };
}