From dcf2ce38e3fd401e13666d896b728c7f5cc74aa3 Mon Sep 17 00:00:00 2001 From: Eli Gao Date: Tue, 24 Dec 2024 00:42:45 +0800 Subject: [PATCH] fix: don't return fullsizePath when disabled --- server/src/services/media.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/services/media.service.ts b/server/src/services/media.service.ts index 10229d21c8..60db5acdee 100644 --- a/server/src/services/media.service.ts +++ b/server/src/services/media.service.ts @@ -247,11 +247,12 @@ export class MediaService extends BaseService { let useExtracted = false; let decodeInputPath: string = asset.originalPath; // Converted or extracted image from non-web-supported formats (e.g. RAW) - let fullsizePath: string = StorageCore.getImagePath(asset, AssetPathType.FULLSIZE, image.preview.format); + let fullsizePath: string | undefined; if (shouldConvertFullsize) { // unset size to decode fullsize image decodeOptions.size = undefined; + fullsizePath = StorageCore.getImagePath(asset, AssetPathType.FULLSIZE, image.preview.format); } if (shouldExtractEmbedded) {