diff --git a/server/src/interfaces/media.interface.ts b/server/src/interfaces/media.interface.ts index 6bbbc5c839..83e7760d7f 100644 --- a/server/src/interfaces/media.interface.ts +++ b/server/src/interfaces/media.interface.ts @@ -139,7 +139,7 @@ export interface VideoInterfaces { export interface IMediaRepository { // image extract(input: string, output: string, withExif?: boolean): Promise; - writeExif(tags: ExifEntity, output: string): Promise; + writeExif(tags: Partial, output: string): Promise; decodeImage(input: string, options: DecodeToBufferOptions): Promise; generateThumbnail(input: string, options: GenerateThumbnailOptions, outputFile: string): Promise; generateThumbnail(input: Buffer, options: GenerateThumbnailFromBufferOptions, outputFile: string): Promise; diff --git a/server/src/services/media.service.ts b/server/src/services/media.service.ts index 20e1f12e4d..5d8261b262 100644 --- a/server/src/services/media.service.ts +++ b/server/src/services/media.service.ts @@ -269,8 +269,11 @@ export class MediaService extends BaseService { // use this as origin of preview and thumbnail decodeInputPath = extractedPath; if (asset.exifInfo) { - // write EXIF, especially orientation and colorspace essential for subsequent processing - await this.mediaRepository.writeExif(asset.exifInfo, extractedPath); + // write essential orientation and colorspace EXIF for correct fullsize preview and subsequent processing + await this.mediaRepository.writeExif( + { orientation: asset.exifInfo.orientation, colorspace: asset.exifInfo.colorspace }, + extractedPath, + ); } } else { fullsizePath = StorageCore.getImagePath(asset, AssetPathType.FULLSIZE, image.preview.format);