Skip to content

Commit

Permalink
docs: add note for Image responsive layout (#25915)
Browse files Browse the repository at this point in the history
With the default Next.js template project, the .main and .container divs have `display: flex` style rule. However, as commented in [this issue](#18489 (comment)), if may not display properly an <Image /> placed as direct child.



## Documentation / Examples

- [x] Make sure the linting passes
  • Loading branch information
abotsi authored Jul 20, 2021
1 parent caaa1be commit 09baca0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/api-reference/next/image.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ but maintain the original dimensions for larger viewports.

When `responsive`, the image will scale the dimensions down for smaller
viewports and scale up for larger viewports.
Note: the responsive layout may not work correctly if the parent element uses a display value other than `block` such as `display: flex` or `display: grid`.

When `fill`, the image will stretch both width and height to the dimensions of
the parent element, provided the parent element is relative. This is usually paired with the [`objectFit`](#objectFit) property.
Expand Down

0 comments on commit 09baca0

Please sign in to comment.