Skip to content

High performance self-hosted photo and video management solution.

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

Mertd2744f52b1da
diff --git a/server/src/repositories/media.repository.ts b/server/src/repositories/media.repository.ts
index 07241c721d..092ca227e4 100644
--- a/server/src/repositories/media.repository.ts
+++ b/server/src/repositories/media.repository.ts
@@ -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 };
}