mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-10-29 17:40:28 +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:
@@ -50,7 +50,7 @@ export class ThumbnailGeneratorProcessor {
|
|||||||
if (asset.type == AssetType.IMAGE) {
|
if (asset.type == AssetType.IMAGE) {
|
||||||
try {
|
try {
|
||||||
await sharp(asset.originalPath, { failOnError: false })
|
await sharp(asset.originalPath, { failOnError: false })
|
||||||
.resize(1440, 2560, { fit: 'inside' })
|
.resize(1440, 1440, { fit: 'outside', withoutEnlargement: true })
|
||||||
.jpeg()
|
.jpeg()
|
||||||
.rotate()
|
.rotate()
|
||||||
.toFile(jpegThumbnailPath);
|
.toFile(jpegThumbnailPath);
|
||||||
|
|||||||
Reference in New Issue
Block a user