next/image resize not working as expected
See original GitHub issueBug report
Describe the bug
First of all thanks for all the efforts building up to the 10.0.0 release! 💪
I’ve been experimenting with the next/image
<Image />
component to do some auto optimisations for the images on my blog. Unfortunately I quickly ran into some resizing issues. When I resize my viewport to be smaller than the image I would expect the image to resize automatically to a smaller variation but it doesn’t.
To Reproduce
Unsure how to reproduce since it might be user error. I’m experimenting with some basic examples like:
<Image src="/avatar.png" alt="avatar" height={500} width={500} />
Expected behavior
I would expect the image to automatically resize to fit the viewport.
Screenshots
See a rather extreme example below.
System information
- OS: macOS
- Browser (if applies): chrome
- Version of Next.js: 10.0.0
- Version of Node.js: 14.5.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:8
- Comments:22 (6 by maintainers)
Top Results From Across the Web
why next/image is not resizing images after release only locally?
And when we deploy our app to our domain it looks like resizing is not working anymore and next image is loading full...
Read more >next/image - Next.js
When the browser chooses, it does not yet know the size of the image on the page, so it selects an image that...
Read more >Next.js automatic image optimization with next/image
Learn about automatic image optimization and how it can benefit developers with the native, game-changing, and powerful next/image API.
Read more >All you need to know about images in Next.js - DatoCMS
Responsiveness: images will be resized according to the device used. Visual stability: the cumulative layout shift problem is automatically ...
Read more >Resizing or Scaling -- IM v6 Examples - ImageMagick
That is the image will not be squashed or squeezed, only resized, unless you tell it otherwise. ... and thus allowing linear operations...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We’re currently working on adding a
layout="responsive"
prop you can pass to NextImage! We’ll have it on canary for you to try soon!any way to make height 100% in responsive