From 2e840b4b86407ccb94f55bfec367f1d9e25444b2 Mon Sep 17 00:00:00 2001 From: multipleof4 Date: Mon, 7 Sep 2026 20:17:35 -0700 Subject: [PATCH] refactor(utils): update imgToWebp defaults to D=96 and q=75 --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index adfdd7b..944db57 100644 --- a/src/utils.js +++ b/src/utils.js @@ -16,7 +16,7 @@ export const fmtSize = b => { return (x >= 10 ? Math.round(x) : Math.round(x * 10) / 10) + ' ' + u[i]; }; export const asDataURL = f => new Promise(r => { const fr = new FileReader(); fr.onload = () => r(String(fr.result || '')); fr.readAsDataURL(f); }); -export const imgToWebp = (f, D = 128, q = 80) => new Promise((r, j) => { +export const imgToWebp = (f, D = 96, q = 75) => new Promise((r, j) => { if (!f) return j(); const i = new Image; i.onload = () => {