Images dominate page weight and LCP on content sites. Next.js next/image resizes, compresses, and lazy-loads— but good habits matter even in the playground.
Discipline that transfers
- Always set meaningful
alttext - Reserve space with width/height (or aspect-ratio) to prevent CLS
- Use
priorityonly for above-the-fold heroes - Serve appropriately sized sources—don’t ship 4000px photos for thumbnails
Remote images
// next.config.js
images: { remotePatterns: [{ protocol: 'https', hostname: 'cdn.example.com' }] }
Self-check
- What is CLS and how do dimensions help?
- When should an image use
priority?