From 011572b631f2e1b6c7951150917fc31c7d1909f1 Mon Sep 17 00:00:00 2001 From: Alvalen Date: Wed, 30 Jul 2025 17:32:50 +0700 Subject: [PATCH] fix: update image configuration --- next.config.js | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/next.config.js b/next.config.js index e088e6a..35df095 100644 --- a/next.config.js +++ b/next.config.js @@ -4,9 +4,14 @@ const withBundleAnalyzer = require("@next/bundle-analyzer")({ module.exports = withBundleAnalyzer({ // your Next.js configuration images: { - domains: ["i.scdn.co"], + remotePatterns: [ + { + protocol: "https", + hostname: "i.scdn.co", + }, + ], // Add image optimization settings - formats: ['image/avif', 'image/webp'], + formats: ["image/avif", "image/webp"], minimumCacheTTL: 60, }, webpack: (config, options) => { @@ -33,19 +38,19 @@ module.exports = withBundleAnalyzer({ ], }, { - source: '/:path*', + source: "/:path*", headers: [ { - key: 'X-Content-Type-Options', - value: 'nosniff', + key: "X-Content-Type-Options", + value: "nosniff", }, { - key: 'X-Frame-Options', - value: 'DENY', + key: "X-Frame-Options", + value: "DENY", }, { - key: 'X-XSS-Protection', - value: '1; mode=block', + key: "X-XSS-Protection", + value: "1; mode=block", }, ], }, @@ -54,8 +59,11 @@ module.exports = withBundleAnalyzer({ // Add performance optimizations reactStrictMode: true, compiler: { - removeConsole: process.env.NODE_ENV === 'production' ? { - exclude: ['error', 'warn'], - } : false, + removeConsole: + process.env.NODE_ENV === "production" + ? { + exclude: ["error", "warn"], + } + : false, }, });