diff --git a/next.config.js b/next.config.js index 8cd58ad..26749da 100644 --- a/next.config.js +++ b/next.config.js @@ -37,7 +37,19 @@ const config = { const nextConfig = withPWA({ dest: 'public', - runtimeCaching: [], + runtimeCaching: [ + { + urlPattern: /\.(?:jpg|jpeg|gif|png|svg|ico|webp)$/i, + handler: 'StaleWhileRevalidate', + options: { + cacheName: 'static-image-assets', + expiration: { + maxEntries: 64, + maxAgeSeconds: 24 * 60 * 60, // 24 hours + }, + }, + }, + ], disableDevLogs: true, })(config);