Skip to content

Commit 4d0ecac

Browse files
committed
Fixed image sizes
1 parent f78ac50 commit 4d0ecac

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

src/components/MDX/MDXComponents.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import {Children, useContext, useMemo} from 'react';
1313
import * as React from 'react';
1414
import cn from 'classnames';
1515
import type {HTMLAttributes} from 'react';
16-
import Image from 'next/image';
1716

1817
import CodeBlock from './CodeBlock';
1918
import {CodeDiagram} from './CodeDiagram';
@@ -489,17 +488,9 @@ function YouTubeIframe(props: any) {
489488
);
490489
}
491490

492-
function CustomImage(props: any) {
491+
function Image(props: any) {
493492
const {alt, ...rest} = props;
494-
return (
495-
<Image
496-
alt={alt}
497-
className="max-w-[calc(min(700px,100%))]"
498-
width={700}
499-
height={400}
500-
{...rest}
501-
/>
502-
);
493+
return <img alt={alt} className="max-w-[calc(min(700px,100%))]" {...rest} />;
503494
}
504495

505496
export const MDXComponents = {
@@ -516,7 +507,7 @@ export const MDXComponents = {
516507
h5: H5,
517508
hr: Divider,
518509
a: Link,
519-
img: CustomImage,
510+
img: Image,
520511
BlogCard,
521512
code: InlineCode,
522513
pre: CodeBlock,

0 commit comments

Comments
 (0)