From 92a7bf212dd009d383841ed6f3efefba9eaa21eb Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Fri, 1 Jul 2022 20:29:45 -0400 Subject: [PATCH] fix(app/metrics): imgb64 resizing --- source/app/metrics/utils.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/app/metrics/utils.mjs b/source/app/metrics/utils.mjs index c7d12dd4..3d4844e1 100644 --- a/source/app/metrics/utils.mjs +++ b/source/app/metrics/utils.mjs @@ -346,7 +346,7 @@ export async function imgb64(image, {width, height, fallback = true} = {}) { } //Resize image if ((width) && (height)) - image = image.resize(width, height) + image = image.resize({width: width > 0 ? width : null, height: height > 0 ? height : null}) return `data:image/${ext};base64,${(await image.toBuffer()).toString("base64")}` }