Fix harmonize:images thumb rebuild and allow oversized museum scans.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila KhodjaefandCursor committed 2026-07-27 12:23:25 +03:00
1 parent 6656f91f25
commit 89e39d408a
8 files changed
+92 -13

No files matched your search

+7 -1
View File
@@ -1691,7 +1691,13 @@ async function generateThumbnailFromFull(fullDest, thumbDest, width = THUMB_WIDT
if (!fs.existsSync(fullDest)) return false;
const ext = path.extname(thumbDest).toLowerCase();
let pipeline = sharp(fullDest).rotate().resize({ width, withoutEnlargement: true });
// Museum scans can exceed Sharp's default ~268MP input cap; we only resize down.
let pipeline = sharp(fullDest, {
limitInputPixels: false,
sequentialRead: true,
})
.rotate()
.resize({ width, withoutEnlargement: true });
if (ext === '.png') {
pipeline = pipeline.png({ quality: 85 });