Complete the code to import the image component from astro:assets.
import { [1] } from 'astro:assets';
The Image component is imported from astro:assets to optimize images.
Complete the code to use the Image component with a source file.
<Image src=[1] alt="Sample image" />
The variable holding the imported image file is commonly named image and passed as src.
Fix the error in the import statement for an image file.
import [1] from '../assets/photo.png';
When importing a file as a module, use a simple variable name without braces.
Fill both blanks to create an optimized image with width 400 and format 'webp'.
<Image src={image} width=[1] format=[2] alt="Optimized image" />Set width to 400 and format to 'webp' for optimized images.
Fill all three blanks to create a responsive image with sizes and placeholder.
<Image src={image} sizes=[1] placeholder=[2] alt=[3] />Use sizes for responsive widths, placeholder as 'blur', and a descriptive alt text.
