Skip to content

Commit

Permalink
Add height property to Next.js Image
Browse files Browse the repository at this point in the history
This is not reflected in the type definition for Next.js's Image
element, but width and height must be set together.¹

¹ <https://nextjs.org/docs/app/building-your-application/optimizing/images#image-sizing>
  • Loading branch information
victorlin committed Nov 20, 2024
1 parent 3fadbb1 commit a16f9e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static-site/components/nav/nav-logo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function NavLogo(): React.ReactElement | null {

const Logo = (): React.ReactElement => (
<a href="/" className={styles.logo}>
<Image src={logo} alt="Nextstrain (logo)" width="40" />
<Image src={logo} alt="Nextstrain (logo)" width="40" height="40" />
</a>
);

Expand Down

0 comments on commit a16f9e6

Please sign in to comment.