-
Notifications
You must be signed in to change notification settings - Fork 29.4k
Description
What version of Next.js are you using?
11.0.1
What version of Node.js are you using?
14.16.1
What browser are you using?
Chrome
What operating system are you using?
Ubuntu 20.04.2 LTS
How are you deploying your application?
yarn start
Describe the Bug
Images with the responsive layout are not displayed on the page if put inside a flexbox container.
Expected Behavior
Responsive images should be visible.
To Reproduce
- Create an app through:
npx create-next-app next-image-flexbox-bug
cd next-image-flexbox-bug
- Create a Next page with the following code:
// pages/next-image-flexbox-bug.js
import Image from 'next/image';
export default function NextImageFlexboxBug() {
return (
<div style={{display: 'flex'}}>
<Image
src="/sunset1.jpg"
alt="Sunset"
width={600}
height={450}
layout="responsive"
/>
</div>
)
}
- Run the server:
yarn dev
- Open in Chrome:
http://localhost:3000/next-image-flexbox-bug
- Nothing is displayed on the page (the white screen).
Metadata
Metadata
Assignees
Labels
No labels