Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

nextjs link image

// The passHref property is required only If the child of Link 
// is a custom component that wraps an <a> tag. This is necessary 
// if you’re using libraries like styled-components. Without this, 
// the <a> tag will not have the href attribute
<Link href="/"> <!-- <Link href="/" passHref> -->
  <a>
    <Image src="/an_image.png" alt="" />
  </a>
</Link>
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #nextjs #link #image
ADD COMMENT
Topic
Name
4+3 =