From 58278fac4976458c9c3419773e4464e761a57221 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 19 Jun 2023 11:23:28 +0800 Subject: [PATCH] compressImage --- lib/notion/mapImage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/notion/mapImage.js b/lib/notion/mapImage.js index ea30fbfc..0d8a7ca0 100644 --- a/lib/notion/mapImage.js +++ b/lib/notion/mapImage.js @@ -10,7 +10,7 @@ const compressImage = (image, width = 400) => { if (!image) { return null } - if (image.indexOf(BLOG.NOTION_HOST) === 0) { + if (image.indexOf(BLOG.NOTION_HOST) === 0 && image.indexOf('amazonaws.com') > 0) { return `${image}&width=${width}` } // 压缩unsplash图片