Skip to content

Commit bd098c1

Browse files
committed
add backendurl to render images
1 parent 5dbdc2d commit bd098c1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

next.config.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,21 @@ import createNextIntlPlugin from 'next-intl/plugin';
77
const jiti = createJiti(fileURLToPath(import.meta.url));
88
jiti('./env');
99

10+
const backendUrl = new URL(process.env.NEXT_PUBLIC_BACKEND_URL);
11+
12+
1013
const withNextIntl = createNextIntlPlugin();
1114
const nextConfig = withNextIntl({
1215
transpilePackages: ['opub-ui'],
16+
images: {
17+
remotePatterns: [
18+
{
19+
protocol: 'https',
20+
hostname: backendUrl.hostname,
21+
pathname: '/api/download/chart_image/**',
22+
},
23+
],
24+
},
1325
});
1426

1527
export default withSentryConfig(nextConfig, {

0 commit comments

Comments
 (0)