1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(server): fix resolution in thumbnail generation (#1737)

* fix landscape images having lower resolution

* do not enlarge images when generating thumbnail
This commit is contained in:
Michael Kreuzer 2023-02-12 05:48:18 +01:00 committed by GitHub
parent 53fb3a36f7
commit 72c947cbaf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -50,7 +50,7 @@ export class ThumbnailGeneratorProcessor {
if (asset.type == AssetType.IMAGE) {
try {
await sharp(asset.originalPath, { failOnError: false })
.resize(1440, 2560, { fit: 'inside' })
.resize(1440, 1440, { fit: 'outside', withoutEnlargement: true })
.jpeg()
.rotate()
.toFile(jpegThumbnailPath);