Skip to content

Commit

Permalink
Add note to next/future/image about default styles. (#38978)
Browse files Browse the repository at this point in the history
  • Loading branch information
leerob committed Jul 25, 2022
1 parent 413d35b commit c3fd9e4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/api-reference/next/future/image.md
Expand Up @@ -39,6 +39,13 @@ Compared to `next/image`, the new `next/future/image` component has the followin
- Note: there is no `fill` mode so `width` & `height` props are required
- Note: the [`onError`](#onerror) prop might behave differently

The default layout for `next/image` was `intrinsic`, which would shrink the `width` if the image was larger than it's container. Since no styles are automatically applied to `next/future/image`, you'll need to add the following CSS to achieve the same behavior:

```css
max-width: 100%;
height: auto;
```

## Required Props

The `<Image />` component requires the following properties.
Expand Down

0 comments on commit c3fd9e4

Please sign in to comment.