Add $NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS to add domains for Next Image plugin

This commit is contained in:
Kyle Lacy 2023-04-17 16:30:36 -07:00
parent b8c06b3121
commit ea87823478
No known key found for this signature in database
GPG Key ID: 82616D2392FB6605
2 changed files with 4 additions and 1 deletions

View File

@ -1,5 +1,6 @@
# Replace with your instance Public IP
# NEXT_PUBLIC_API_BASE_URL = "http://localhost"
NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS=
NEXT_PUBLIC_GOOGLE_CLIENTID=""
NEXT_PUBLIC_GITHUB_APP_NAME=""
NEXT_PUBLIC_GITHUB_ID=""
@ -7,4 +8,4 @@ NEXT_PUBLIC_SENTRY_DSN=""
NEXT_PUBLIC_ENABLE_OAUTH=0
NEXT_PUBLIC_ENABLE_SENTRY=0
NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0
NEXT_PUBLIC_TRACK_EVENTS=0
NEXT_PUBLIC_TRACK_EVENTS=0

View File

@ -1,5 +1,6 @@
const { withSentryConfig } = require("@sentry/nextjs");
const path = require("path");
const extraImageDomains = (process.env.NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS ?? "").split(",").filter((domain) => domain.length > 0);
const nextConfig = {
reactStrictMode: false,
@ -11,6 +12,7 @@ const nextConfig = {
"planefs.s3.amazonaws.com",
"images.unsplash.com",
"avatars.githubusercontent.com",
...extraImageDomains,
],
},
output: "standalone",