mirror of
https://github.com/immich-app/immich.git
synced 2025-06-04 06:04:21 -04: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:
parent
53fb3a36f7
commit
72c947cbaf
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user