forked from OSPC-VITC/Spectrum
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
38 lines (37 loc) · 1.01 KB
/
next.config.js
File metadata and controls
38 lines (37 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: [
'plus.unsplash.com',
'images.unsplash.com',
'media.istockphoto.com',
'plus.unsplash.com'
],
remotePatterns: [
{
protocol: 'https',
hostname: '**.unsplash.com',
},
{
protocol: 'https',
hostname: '**.istockphoto.com',
}
],
// Optimize image loading
deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
imageSizes: [16, 32, 48, 64, 96, 128, 256, 384],
formats: ['image/webp', 'image/avif'],
minimumCacheTTL: 60, // Cache images for at least 60 seconds
dangerouslyAllowSVG: true, // Allow SVG images
contentDispositionType: 'attachment', // Improve security
},
// Add Gzip compression
compress: true,
// Optimize build output
swcMinify: true,
// Reduce JavaScript bundle size
reactStrictMode: true,
// Optimize for production builds
productionBrowserSourceMaps: false,
}
module.exports = nextConfig