Skip to content

Instantly share code, notes, and snippets.

@prichodko
Created April 6, 2021 16:35
Show Gist options
  • Save prichodko/4cb5f5a698d64939003c6eda11672ff1 to your computer and use it in GitHub Desktop.
Save prichodko/4cb5f5a698d64939003c6eda11672ff1 to your computer and use it in GitHub Desktop.
MDX with next/image and zoom
import Image from 'next/image';
import Zoom from 'react-medium-image-zoom'
const MyImage = (props) => {
return (
<Zoom>
<Image
src={props.src}
alt={props.alt}
width={props.width}
height={props.height}
/>
</Zoom>
)
}
const MDXComponents = {
img: MyImage,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment