Why this matters
Ensures optimization, stable layout (no CLS), and responsive loading.
Always use the Next.js Image component for images with width/height (or fill) and meaningful alt text. Avoid plain <img> for app assets.
Ensures optimization, stable layout (no CLS), and responsive loading.
Side-by-side examples engineers can pattern-match during review.
<img src="/hero.png" />import Image from 'next/image'
export default function Hero(){ return (<Image src="/hero.png" width={1200} height={600} alt="Product hero" priority />) }<img src="/avatar.jpg"><Image src="/avatar.jpg" width={64} height={64} alt="User avatar" />From the same buckets as this rule.