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) {