From 60a3650b60be1f922709fe850aedfa61c5f45505 Mon Sep 17 00:00:00 2001 From: "tangly1024.com" Date: Mon, 29 Apr 2024 14:41:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- next.config.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/next.config.js b/next.config.js index 5c1ba810..bda40204 100644 --- a/next.config.js +++ b/next.config.js @@ -54,6 +54,22 @@ function scanSubdirectories(directory) { } const nextConfig = { + images: { + // 图片压缩 + formats: ['image/avif', 'image/webp', 'image/png'], + // 允许next/image加载的图片 域名 + domains: [ + 'gravatar.com', + 'www.notion.so', + 'avatars.githubusercontent.com', + 'images.unsplash.com', + 'source.unsplash.com', + 'p1.qhimg.com', + 'webmention.io', + 'ko-fi.com' + ] + }, + // 默认将feed重定向至 /public/rss/feed.xml async redirects() { return [