fix: use tiff thumbnails in first step + e2e fix

This commit is contained in:
Jonathan Jogenfors 2023-10-14 23:50:12 +02:00
parent 259ed35b62
commit 4c56ef0526
2 changed files with 5 additions and 3 deletions

View file

@ -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.

View file

@ -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;