Skip to content

Instantly share code, notes, and snippets.

@rimzzlabs
Last active September 26, 2022 07:29
Show Gist options
  • Save rimzzlabs/b1e6b8e925877a2eeb2680d6d396c2e8 to your computer and use it in GitHub Desktop.
Save rimzzlabs/b1e6b8e925877a2eeb2680d6d396c2e8 to your computer and use it in GitHub Desktop.
next/image without explicit height and width
import Image from "next/image"
export function ImageComponent(){
return (
<figure className="relative w-40 h-40 md:w-80 md:h-80">
<Image lazy layout="fill" />
</figure>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment