Framework Guides· Framework Guide

Nuxt image optimization guide

How to use Nuxt Image for responsive formats, predictable widths, and cleaner media delivery in Nuxt 3.

Nuxt Image is strongest when you decide the provider, width system, and formats intentionally. The weak version is sprinkling `<NuxtImg>` into templates without a sizing strategy.

Best for

Nuxt 3 sites with mixed local and CDN media

Default goal

Stable widths, modern formats, fewer ad-hoc transforms

Watch closely

Provider choice and width sprawl

Recommended setup

Pick one provider strategy and document it. For editorial sites, confusion usually starts when local assets, transformed CDN assets, and raw external URLs all coexist without rules.

Use project-wide screen definitions and map them to the actual layout widths in your templates. That keeps generated variants from drifting.

  • Define the image provider once and prefer shared `screens` values.
  • Set `sizes` explicitly for article heroes, archive cards, and utility images.
  • Use `format` and `densities` deliberately instead of relying on accidental defaults.

Editorial hero with Nuxt Image

<NuxtImg
  src="/images/editorial-hero.jpg"
  alt="Editorial hero"
  width="1440"
  height="960"
  sizes="sm:100vw md:768px lg:1200px"
  format="webp"
  densities="x1 x2"
/>

What to measure

  • Whether generated widths actually match layout breakpoints.
  • How many transformed variants are produced for the same visual slot.
  • Whether article images keep consistent aspect ratios between archive and detail views.

Why this page is a pSEO fit

Nuxt-specific image intent is implementation intent. A good page here looks closer to practical docs than a generic image-format explainer.

Checklist

  • Keep `screens` tied to real layout widths.
  • Use the same image conventions across article, archive, and utility templates.
  • Prefer one provider path per asset class.
  • Set alt text and dimensions consistently.

Common mistakes

  • Letting every component invent its own width ladder.
  • Mixing transformed and raw images in the same layout without intent.
  • Using modern formats without thinking about editorial source quality first.

Quick answers

What is the biggest Nuxt Image mistake?

Treating the component as the strategy. The strategy is still the provider, the width system, and the layout rules behind it.

Should Nuxt Image replace every image tag?

For a media-heavy Nuxt site, usually yes. But decorative icons, SVGs, and some unprocessed assets may still stay as regular tags.