diff --git a/server/src/repositories/media.repository.ts b/server/src/repositories/media.repository.ts
index cca87f44f2..0777ca3479 100644
--- a/server/src/repositories/media.repository.ts
+++ b/server/src/repositories/media.repository.ts
@@ -79,13 +79,12 @@ export class MediaRepository implements IMediaRepository {
       failOn: options.processInvalidImages ? 'none' : 'error',
       limitInputPixels: false,
       raw: options.raw,
-    });
+    })
+      .pipelineColorspace(options.colorspace === Colorspace.SRGB ? 'srgb' : 'rgb16')
+      .withIccProfile(options.colorspace);
 
     if (!options.raw) {
-      pipeline = pipeline
-        .pipelineColorspace(options.colorspace === Colorspace.SRGB ? 'srgb' : 'rgb16')
-        .withIccProfile(options.colorspace)
-        .rotate();
+      pipeline = pipeline.rotate();
     }
 
     if (options.crop) {