diff --git a/next.config.js b/next.config.js index f0ff1b30..405f4137 100644 --- a/next.config.js +++ b/next.config.js @@ -35,6 +35,9 @@ const nextConfig = { .concat(createRemotePattern(HOSTNAME_AWS_S3)), minimumCacheTTL: 31536000, }, + experimental: { + serverComponentsExternalPackages: ['jimp'], + }, }; const withBundleAnalyzer = require('@next/bundle-analyzer')({ diff --git a/src/photo/form/PhotoForm.tsx b/src/photo/form/PhotoForm.tsx index 7e0e7f26..a354e49a 100644 --- a/src/photo/form/PhotoForm.tsx +++ b/src/photo/form/PhotoForm.tsx @@ -264,7 +264,7 @@ export default function PhotoForm({ url, 640, undefined, - window.location.origin, + typeof window !== 'undefined' ? window.location.origin : undefined, )} width={width} height={height}