---
title: "Images without width/height or aspect-ratio (perf/images-missing-dimensions)"
description: "perf/images-missing-dimensions: Without intrinsic dimensions the browser reserves 0px and shifts the layout when the image loads."
canonical: https://void-design.vercel.app/rules/perf/images-missing-dimensions
lastModified: 2026-09-16
---

# Images without width/height or aspect-ratio

`perf/images-missing-dimensions` · severity **warn** · category Performance · detected by `void perf` and `void audit`

## Why it matters

Without intrinsic dimensions the browser reserves 0px and shifts the layout when the image loads.

## How to fix it

Add width and height attributes (CSS can still scale with height:auto) or set aspect-ratio in CSS.

## Example

```
<img src="/card.avif" width="640" height="360" style="height:auto" alt="…">
```

## References

- https://web.dev/articles/optimize-cls#images-without-dimensions

## More performance rules

`void perf` reports 25 rules in this category. Core Web Vitals and bytes: LCP, CLS, TBT, TTFB, JavaScript, CSS, fonts, images, caching and compression, measured as the median of several runs on a throttled mobile and a desktop profile.

- `lcp-image-no-priority` LCP image has no fetchpriority="high" — [perf/lcp-image-no-priority](https://void-design.vercel.app/rules/perf/lcp-image-no-priority)
- `lcp-background-image` LCP element is a CSS background image — [perf/lcp-background-image](https://void-design.vercel.app/rules/perf/lcp-background-image)
- `image-oversized` Image is much larger than its rendered size — [perf/image-oversized](https://void-design.vercel.app/rules/perf/image-oversized)
- `image-legacy-format` Image served in a legacy format — [perf/image-legacy-format](https://void-design.vercel.app/rules/perf/image-legacy-format)
- `render-blocking` Render-blocking resources delay first paint — [perf/render-blocking](https://void-design.vercel.app/rules/perf/render-blocking)
- `no-text-compression` Text resources are served uncompressed — [perf/no-text-compression](https://void-design.vercel.app/rules/perf/no-text-compression)
- `cache-headers` Hashed static assets are not cached long-term — [perf/cache-headers](https://void-design.vercel.app/rules/perf/cache-headers)
- `third-party-heavy` Heavy third-party footprint — [perf/third-party-heavy](https://void-design.vercel.app/rules/perf/third-party-heavy)

Detected by `void perf` and `void audit`. Explain it in a terminal: `void rules perf/images-missing-dimensions`
