0Pricing
Sveltejs Academy · Lesson

Optimizing Images with @sveltejs/enhanced-img

Serve correctly sized, next-gen images with the enhanced:img component.

Image Optimization

The @sveltejs/enhanced-img plugin generates responsive, modern-format images at build time.

Install

Add to dev dependencies and register in Vite config.

npm install -D @sveltejs/enhanced-img

All lessons in this course

  1. Code Splitting and Dynamic Imports
  2. Optimizing Images with @sveltejs/enhanced-img
  3. Lazy Loading Components
  4. Profiling SvelteKit Apps
← Back to Sveltejs Academy