fix: load the school image eorrectly

This commit is contained in:
N3WT DE COMPET
2025-06-01 08:41:12 +02:00
parent 2f6d30b85b
commit 6bc24055cd
2 changed files with 23 additions and 17 deletions

View File

@ -5,6 +5,9 @@ const pkg = require('./package.json');
const withNextIntl = createNextIntlPlugin();
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080';
const apiUrlObj = new URL(apiUrl);
/** @type {import('next').NextConfig} */
const nextConfig = {
output: 'standalone',
@ -19,9 +22,9 @@ const nextConfig = {
hostname: 'www.gravatar.com',
},
{
protocol: 'http',
hostname: 'localhost',
port: '8080',
protocol: apiUrlObj.protocol.replace(':', ''),
hostname: apiUrlObj.hostname,
...(apiUrlObj.port ? { port: apiUrlObj.port } : {}),
},
],
},