Comparing image optimization strategies and when to use each approach.
Both offer image optimization. Here's when to use each.
Pros: Automatic lazy loading, responsive sizes, format conversion (WebP/AVIF)
Cons: Requires width/height or fill, can be tricky with dynamic images
Pros: URL-based transformations, hotspot/crop from CMS, no build step
Cons: Additional CDN requests, separate from your app's optimization
Use Sanity's pipeline for CMS images (leverage hotspot data). Use Next.js Image for static assets and when you need fine control over loading behavior.