From 2f9019c0e1bd7d305e97d90ede1fa9f241038884 Mon Sep 17 00:00:00 2001 From: Alex Date: Tue, 12 Nov 2024 09:07:56 -0600 Subject: [PATCH] fix(server): correct rotation for common files (#14092) * fix(server): correct rotation for common files * fix: test: * pr feedback --- server/src/services/media.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/services/media.service.ts b/server/src/services/media.service.ts index c7b3dbced1..0aa6bd03fb 100644 --- a/server/src/services/media.service.ts +++ b/server/src/services/media.service.ts @@ -214,7 +214,7 @@ export class MediaService extends BaseService { const colorspace = this.isSRGB(asset) ? Colorspace.SRGB : image.colorspace; const processInvalidImages = process.env.IMMICH_PROCESS_INVALID_IMAGES === 'true'; - const orientation = Number(asset.exifInfo?.orientation) || undefined; + const orientation = useExtracted && asset.exifInfo?.orientation ? Number(asset.exifInfo.orientation) : undefined; const decodeOptions = { colorspace, processInvalidImages, size: image.preview.size, orientation }; const { data, info } = await this.mediaRepository.decodeImage(inputPath, decodeOptions);