Nuxt · NUXT0008

Provide image dimensions or sizes

Finds Nuxt project code that should use the supported responsive dimensions pattern instead.
NUXT0008vite-doctor/nuxt-imageimageswarnSuggestion
nuxt-image/prefer-responsive-dimensionssrc/rule-packs/nuxt/rules/nuxt-image.ts Upstream docs

Run this rule

pnpm nuxt doctor --rules nuxt-image/prefer-responsive-dimensions

Why it matters

Images affect accessibility, layout stability, and performance. Nuxt Image gives the framework enough information to optimize them.

Use the Nuxt-supported responsive dimensions pattern instead.

Example

Use responsive dimensions

Before

<template>
  <img src="/hero.png">
</template>

After

<template>
  <NuxtImg src="/hero.png" alt="Hero" width="1200" height="630" />
</template>
Copyright © 2026