diff --git a/packages/backend/src/config.ts b/packages/backend/src/config.ts index 92005a2747a3..3842587f7275 100644 --- a/packages/backend/src/config.ts +++ b/packages/backend/src/config.ts @@ -97,6 +97,7 @@ export type Source = { abuseDiscordHook: string; disableAbuseRepository?: boolean; notificationLimit?: number; + maxWebImageSize?: number; } }; diff --git a/packages/backend/src/core/DriveService.ts b/packages/backend/src/core/DriveService.ts index a9efeaf3a683..35e2ec322a14 100644 --- a/packages/backend/src/core/DriveService.ts +++ b/packages/backend/src/core/DriveService.ts @@ -304,7 +304,7 @@ export class DriveService { const metadata = await img.metadata(); isAnimated = !!(metadata.pages && metadata.pages > 1); - const maxSize = 8192; + const maxSize = this.config.nirila?.maxWebImageSize ?? 8192; // nirila Extension: We want to keep original size as possible // noinspection PointlessBooleanExpressionJS satisfyWebpublic = !!(