Replies: 3 comments 6 replies
-
The previous code I had before I didn't use fill, instead just gave height and width of the image, but the Lighthouse will give me error on delivering wrong size. Another way to do it, would be to make a bunch of individual images, and then somehow (don't know how), have next/image present the proper size image.. But according to the next/image documentation there should be no problem on presenting the proper size image anyway.. |
Beta Was this translation helpful? Give feedback.
-
As per docs, https://nextjs.org/docs/pages/api-reference/components/image#fill:
So, pretty much the parent indicates the dimensions to take over, and the image just "fills" into that container. |
Beta Was this translation helpful? Give feedback.
-
Hmmm.. I tried obsolute, relative, static, and sticky.. I I turn on Pesticide I can see there is some lines inside the divs... but the image isn't filling the divs.. What could be the reason it doesn't display?
|
Beta Was this translation helpful? Give feedback.
-
Summary
Would anybody provide feedback on this?
ERROR:
The image covers the entire screen... and the div I have should only do no more than half the screen.
I updated to the latest Next.js version... and I am trying to fix a "not properly size image" from the Lighthouse.
Try a few things, but long story short... apparently Next.js offers a responsive image sizing, that might fix the image problem issue from the Lighthouse?
Next.js references I have are:
https://www.youtube.com/watch?v=IU_qq_c_lKA
https://nextjs.org/docs/pages/api-reference/components/image?utm_source=lighthouse&utm_medium=devtools#sizes
https://nextjs.org/docs/app/building-your-application/optimizing/images
My code:
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions