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

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