---
title: "Raw `<img>` in a Next.js app (lint/img-raw)"
description: "lint/img-raw: `<img>` skips Next's image pipeline: no responsive `srcset`, no AVIF/WebP, no lazy loading by default and no intrinsic size reservation,…"
canonical: https://void-design.vercel.app/rules/lint/img-raw
lastModified: 2026-09-16
---

# Raw `<img>` in a Next.js app

`lint/img-raw` · severity **warn** · category Lint · detected by `void lint` and `void audit`

## Why it matters

`<img>` skips Next's image pipeline: no responsive `srcset`, no AVIF/WebP, no lazy loading by default and no intrinsic size reservation, so it is usually the largest LCP and CLS cost on the page.

## How to fix it

Use `next/image` with `width`/`height` (or `fill` + `sizes`). Raw `<img>` is fine for SVG icons, data URIs and `ImageResponse` OG images.

## Example

```tsx
import Image from 'next/image'
<Image src={hero} alt="Dashboard overview" sizes="(min-width: 1024px) 50vw, 100vw" />
```

## References

- https://nextjs.org/docs/app/api-reference/components/image

## More lint rules

`void lint` reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.

- `tw-important-soup` Many `!important` utilities in one file — [lint/tw-important-soup](https://void-design.vercel.app/rules/lint/tw-important-soup)
- `tw-arbitrary-sprawl` Many arbitrary colors / pixel values bypass the design tokens — [lint/tw-arbitrary-sprawl](https://void-design.vercel.app/rules/lint/tw-arbitrary-sprawl)
- `page-level-use-client` `"use client"` at the top of a page or layout — [lint/page-level-use-client](https://void-design.vercel.app/rules/lint/page-level-use-client)
- `heavy-import` Heavy dependency imported into client code — [lint/heavy-import](https://void-design.vercel.app/rules/lint/heavy-import)
- `img-missing-dimensions` Image without width/height (or fill / aspect-ratio) — [lint/img-missing-dimensions](https://void-design.vercel.app/rules/lint/img-missing-dimensions)
- `image-priority-deprecated` `priority` on `next/image` is deprecated in Next 16 — [lint/image-priority-deprecated](https://void-design.vercel.app/rules/lint/image-priority-deprecated)
- `missing-alt` Image without `alt` — [lint/missing-alt](https://void-design.vercel.app/rules/lint/missing-alt)
- `google-fonts-link` Google Fonts loaded via `<link>` / `@import` — [lint/google-fonts-link](https://void-design.vercel.app/rules/lint/google-fonts-link)

Detected by `void lint` and `void audit`. Explain it in a terminal: `void rules lint/img-raw`
