1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-18 16:05:33 -04:00

next-mdx-remote v4 (#737)

This commit is contained in:
2022-01-18 09:25:09 -05:00
committed by GitHub
parent 2ef5d06c38
commit a406010bd2
110 changed files with 1009 additions and 1490 deletions

View File

@@ -0,0 +1,21 @@
import NextImage from "next/image";
import type { ImageProps as NextImageProps } from "next/image";
const Image = ({ src, width, height, alt, quality, priority }: NextImageProps) => {
return (
<div className="image_wrapper">
<NextImage
src={(src as string).replace(/^\/public/g, "")}
layout="intrinsic"
width={width}
height={height}
alt={alt || ""}
quality={quality || 65}
loading={priority ? "eager" : "lazy"}
priority={!!priority}
/>
</div>
);
};
export default Image;