Skip to main content
Alvin QuachFull Stack Developer
HomeProjectsExperienceBlog
HomeProjectsExperienceBlog
alvinquach

Full Stack Developer building systems that respect complexity.

Open to opportunities

AQ

Projects

  • All Projects
  • Hoparc Physical Therapy
  • OpportunIQ
  • Hoop Almanac
  • SculptQL

Knowledge

  • Blog
  • Experience
  • Interview Prep

Connect

  • Contact
  • LinkedIn
  • GitHub
  • X

Resources

  • Resume
© 2026All rights reserved.
Back to Blogs
Decision
Depth: ●●○○○

Image Optimization: Next.js Image vs Sanity CDN

Comparing image optimization strategies and when to use each approach.

Published August 11, 20251 min readImportance: ★★★☆☆
Share:

Image Optimization: Next.js Image vs Sanity CDN

Both offer image optimization. Here's when to use each.

Next.js Image Component

Pros: Automatic lazy loading, responsive sizes, format conversion (WebP/AVIF)

Cons: Requires width/height or fill, can be tricky with dynamic images

Sanity Image Pipeline

Pros: URL-based transformations, hotspot/crop from CMS, no build step

Cons: Additional CDN requests, separate from your app's optimization

My Approach

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.