# Disallow image size exceeding the maximum allowed dimension (`@greenpoint/no-resized-image`)

⚠️ This rule _warns_ in the ✅ `recommended` config.

# Disallow image size exceeding the maximum allowed dimension (`@greenpoint/no-resized-image`)

⚠️ This rule _warns_ in the ✅ `recommended` config.

<!-- end auto-generated rule header -->

## Rule Details

This rule aims to encourage resizing images outside the browser instead of with width and height attributes to transfer a smaller image to the web page.

## Examples

Examples of **non-compliant** code for this rule:

## Examples

Examples of **non-compliant** code for this rule:

```js
<img src="./img.svg" style={{ width: 100, height: 100 }} />
```

Examples of **compliant** code for this rule:
Examples of **compliant** code for this rule:

```js
<img src="./img.svg" />
```

## Further Reading

- [cnumr/best-practices/Avoid resizing images in the browser](https://github.com/cnumr/best-practices/blob/fc5a1f865bafb196e4775cce8835393751d40ed8/chapters/BP_034_en.md)

## Further Reading

- [cnumr/best-practices/Avoid resizing images in the browser](https://github.com/cnumr/best-practices/blob/fc5a1f865bafb196e4775cce8835393751d40ed8/chapters/BP_034_en.md)
