From 72c947cbafb7c428c0aca82091704ef4b1148996 Mon Sep 17 00:00:00 2001 From: Michael Kreuzer Date: Sun, 12 Feb 2023 05:48:18 +0100 Subject: [PATCH] fix(server): fix resolution in thumbnail generation (#1737) * fix landscape images having lower resolution * do not enlarge images when generating thumbnail --- server/apps/microservices/src/processors/thumbnail.processor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/apps/microservices/src/processors/thumbnail.processor.ts b/server/apps/microservices/src/processors/thumbnail.processor.ts index b6656d86e5..b1b1928197 100644 --- a/server/apps/microservices/src/processors/thumbnail.processor.ts +++ b/server/apps/microservices/src/processors/thumbnail.processor.ts @@ -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);