Complete the code to import the Next.js Image component.
import [1] from 'next/image';
The Next.js Image component is imported as Image from 'next/image'.
Complete the code to set the image source to '/logo.png'.
<Image src=[1] alt="Logo" width={100} height={100} />
The src attribute requires the path starting with a slash for public folder images, so '/logo.png' is correct.
Fix the error in the code to make the image responsive using the 'fill' layout.
<Image src="/banner.jpg" alt="Banner" [1] />
Next.js Image uses layout="fill" to make the image fill its parent container responsively.
Fill both blanks to add width and height props for a fixed size image.
<Image src="/avatar.png" alt="User Avatar" width=[1] height=[2] />
The width and height props must be numbers. Here width is 100 and height is 150 for a fixed size image.
Fill all three blanks to create a responsive image with priority loading and alt text 'Hero Image'.
<Image src=[1] alt=[2] priority=[3] width={800} height={600} />
Use the image path "/hero.jpg", alt text "Hero Image", and set priority to true for faster loading.