ソースを参照

fix: use tiff thumbnails in first step + e2e fix

Jonathan Jogenfors 1 年間 前
コミット
4c56ef0526

+ 1 - 1
server/src/infra/repositories/media.repository.ts

@@ -29,7 +29,7 @@ export class MediaRepository implements IMediaRepository {
     const buffer = await sharp(input, { failOn: 'none' })
       .resize(options.size, options.size, { fit: 'outside', withoutEnlargement: true })
       .rotate()
-      .jxl({ lossless: true })
+      .tiff()
       .toBuffer();
     // A second sharp instance is required for the ICC profile, as all metadata
     // is preserved otherwise.

+ 4 - 2
server/test/e2e/metadata.e2e-spec.ts

@@ -23,7 +23,7 @@ describe(`${AssetController.name} (e2e)`, () => {
   let admin: LoginResponseDto;
 
   beforeAll(async () => {
-    app = await createTestApp(true);
+    app = await createTestApp(true, true);
     server = app.getHttpServer();
   });
 
@@ -62,7 +62,9 @@ describe(`${AssetController.name} (e2e)`, () => {
       const assetWithLocation = assets[0];
 
       expect(assetWithLocation).toEqual(
-        expect.objectContaining({ exifInfo: expect.objectContaining({ latitude: 1, longitude: 1 }) }),
+        expect.objectContaining({
+          exifInfo: expect.objectContaining({ latitude: 39.115, longitude: -108.400968333333 }),
+        }),
       );
 
       const assetId = assetWithLocation.id;