Nuxt
Nuxt

How can Nuxt Image v2 be configured to optimize images for different screen densities and devices?

December 4, 2025

Nuxt Image v2 optimizes images by configuring different presets for various screen densities and device types.

It automatically serves appropriately sized and formatted images based on device capabilities using built-in presets, lazy loading, and format fallback strategies. This improves performance and quality across devices by minimizing bandwidth while maintaining visual fidelity.

Code

// Option 1
const img = useImage()

// Full autocomplete for modifiers
const url = img('/image.jpg', { 
 width: 300,
 height: 200,
 fit: 'cover' // TypeScript knows the valid values!
})

// Option 2
<template>
  <NuxtImg
    src="/images/banner.jpg"
    sizes="sm:100vw md:50vw lg:33vw"
    densities="1x 2x 3x"
    format="webp"
    alt="Banner"
  />
</template>
Hire Now!

Need Help with Nuxt Development ?

Ready to leverage the power of conversational AI? Start your project with Zignuts expert AI developers.
bg-image
download-image
Company Deck
PDF, 3MB
© 2026 Zignuts Technolab. All Rights Reserved.
branch imagesbranch imagesbranch imagesbranch imagesbranch imagesbranch images