1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-25 02:04:15 +02:00

Merge pull request #558 from sam365724/patch-1

Change from jpg to more efficient webp thumbnails
This commit is contained in:
Patrik J. Braun 2022-11-21 22:12:44 +01:00 committed by GitHub
commit 70d1a04e1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -121,7 +121,7 @@ export class PhotoProcessing {
return path.join(
ProjectPath.TranscodedFolder,
ProjectPath.getRelativePathToImages(path.dirname(mediaPath)),
file + '_' + size + '.jpg'
file + '_' + size + '.webp'
);
}
@ -146,7 +146,7 @@ export class PhotoProcessing {
.digest('hex') +
'_' +
size +
'.jpg'
'.webp'
);
}

View File

@ -161,7 +161,7 @@ export class ImageRendererFactory {
fit: 'cover',
});
}
await image.withMetadata().jpeg().toFile(input.outPath);
await image.withMetadata().webp({effort: 6, quality: 60}).toFile(input.outPath);
};
}
}