Add 1080 to custom next sizes

This commit is contained in:
Sam Becker 2024-02-23 21:23:26 -06:00
parent 7610be41d5
commit 6e94f9f23a
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ const createRemotePattern = (hostname) => hostname
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
imageSizes: [200],
imageSizes: [200, 1080],
remotePatterns: []
.concat(createRemotePattern(HOSTNAME_VERCEL_BLOB))
.concat(createRemotePattern(HOSTNAME_CLOUDFLARE_R2))

View File

@ -1,7 +1,8 @@
import { BASE_URL } from '@/site/config';
// Explicity defined next.config.js `imageSizes`
type NextCustomSize = 200;
type NextCustomSize = 200 | 1080;
type NextImageDeviceSize = 640 | 750 | 828 | 1080 | 1200 | 1920 | 2048 | 3840;
export type NextImageSize = NextCustomSize | NextImageDeviceSize;