From b69799d75f418ebc2278c5acbdde34fc9f6d1c5d Mon Sep 17 00:00:00 2001 From: flt6 <1404262047@qq.com> Date: Thu, 20 Jun 2024 09:59:09 +0800 Subject: [PATCH] Never compress svg image --- lib/notion/mapImage.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index 491632bc..5bb1e9b1 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -110,6 +110,8 @@ const compressImage = (image, width, quality = 50, fmt = 'webp') => { return image } + if (image.includes(".svg")) return image + if (!width || width === 0) { width = siteConfig('IMAGE_COMPRESS_WIDTH') }