Skip to content

Instantly share code, notes, and snippets.

@Kola92
Last active February 21, 2023 12:17
Show Gist options
  • Save Kola92/0dbf2481995623875ccea3e18b64ce73 to your computer and use it in GitHub Desktop.
Save Kola92/0dbf2481995623875ccea3e18b64ce73 to your computer and use it in GitHub Desktop.
Image Component
import Image from "next/image";
import Avatar from "../public/avatar.png";
export default function ImageComp() {
return (
<Image
src={Avatar}
alt="Picture of the author"
// width={500} automatically provided
// height={500} automatically provided
// blurDataURL="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" automatically provided
// placeholder="blur" // Optional blur-up while loading
/>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment