From 8ee9a406c993a08d1cdd6ec7d6acaa68dc215fe4 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 16 Feb 2021 12:47:38 +0100 Subject: [PATCH] fix: use Math.round for generated width --- src/runtime/image.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/image.ts b/src/runtime/image.ts index f4f38d692..4c9e30706 100644 --- a/src/runtime/image.ts +++ b/src/runtime/image.ts @@ -170,7 +170,7 @@ function getSizes (ctx: ImageCTX, input: string, opts: ImageSizesOptions) { continue } if (isFluid) { - width = (width / 100) * screenMaxWidth + width = Math.round((width / 100) * screenMaxWidth) } const height = ratio ? Math.round(width * ratio) : parseSize(opts.modifiers.height) variants.push({