diff --git a/next.config.mjs b/next.config.mjs index 84682de1..c0948898 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,9 +1,15 @@ import { withPayload } from '@payloadcms/next/withPayload' /** @type {import('next').NextConfig} */ +const basePath = process.env.NEXT_BASE_PATH || '' +const assetPrefix = process.env.NEXT_ASSET_PREFIX || basePath || undefined +const allowedImageHost = process.env.NEXT_PUBLIC_SITE_URL + const nextConfig = { + basePath, + assetPrefix, images: { - remotePatterns: [new URL('https://jorgesolla.com.br/**')], + remotePatterns: [new URL(`${allowedImageHost}/**`)], }, }