aboutsummaryrefslogtreecommitdiff
path: root/src/Image.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Image.tsx')
-rw-r--r--src/Image.tsx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Image.tsx b/src/Image.tsx
index 770c383..37e55ba 100644
--- a/src/Image.tsx
+++ b/src/Image.tsx
@@ -1,13 +1,12 @@
import ImageBase from 'next/future/image';
import { FC } from 'react';
+import benzinConfig from './benzinConfig';
type Props = Record<'src' | 'alt', string>;
-const IMAGE_CDN = 'http://localhost:8000';
-
const localizeSrc = (src: string) => {
- if (process.env.NODE_ENV === 'production' || src.startsWith('http')) return src;
- return IMAGE_CDN + src;
+ if (src.startsWith('http')) return src;
+ return benzinConfig.CDN + src;
}
const Image: FC<Props> = ({ src, ...props }) => {