Complete the code to import the Next.js Image component correctly.
import [1] from 'next/image';
The Next.js Image component is imported as Image from 'next/image'. This enables automatic image optimization.
Complete the code to use the Image component with a required width of 300 pixels.
<Image src="/logo.png" alt="Logo" [1]={300} height={200} />
The Image component requires the width prop to set the image's width in pixels.
Fix the error in the Image component usage by completing the missing required prop.
<Image src="/banner.jpg" alt=[1] width={600} height={400} />
The alt attribute is required for accessibility and must be a descriptive string.
Fill both blanks to create an Image component that loads lazily and uses a blur placeholder.
<Image src="/photo.jpg" alt="Photo" width={500} height={300} [1]=[2] />
The placeholder prop set to "blur" shows a blurred preview while loading.
Fill all three blanks to create an Image component that loads lazily and sets priority loading.
<Image src="/hero.png" alt="Hero" width={800} height={600} [1]=[2] [3] />
The loading="lazy" defers loading offscreen images, and priority makes this image load quickly as important content.