🩹 Chore: tweak processUsers.js to reduce feature image size (#980)

While we can't rewrite history, we can at least slow its growth.
WebP with lower quality settings gives about 2x size reduction with acceptable visual results.
This commit is contained in:
ZhenShuo Leo
2025-05-07 23:43:50 +08:00
parent 1d21656d5e
commit ea7b69f4e6

View File

@@ -140,7 +140,7 @@ puppeteer
fs.writeFileSync(dir + '/index.' + targetLangs[j] + '.md', content);
}
await page.goto(users[i].url);
await page.screenshot({ path: dir + "/feature.jpg" });
await page.screenshot({ path: dir + "/feature.jpg", type: 'webp', quality: 50, });
}
}