Open westernal opened 1 year ago
Try using css property "object-fit:cover"
Try using css property "object-fit:cover"
I did and it didn't work.
I just saw this issue's text on IOS and saw this:
I think the problem is with the image itself.
This issue is solved when I add width <Image src={logo} alt="logo" height={200} width={200}
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
Image optimization (next/image, next/legacy/image)
Link to the code that reproduces this issue
GitHub: https://github.com/westernal/Portfolio Website: https://alinavidi.dev/
To Reproduce
Click on burger menu and go to projects.
The code
<Image src={project.image.website} width={300} height={150} id="project-image" alt={"Westernal's website"} />
Test on Windows
Actual result on IOS
The image
Describe the Bug
I'm using Next.js to build my portfolio but there is a problem, when I tested it on chrome with my laptop everything is perfect but when I deployed it the image was broken. I tried fill option and object-fit but nothing worked.
I've never had this issue before with next/images. I'll be happy if you help me understand what happened.
Expected Behavior
Showing the whole image as the docs says:
but its not stretching.
Which browser are you using? (if relevant)
Safari and Chrome on IOS 16.3.1
How are you deploying your application? (if relevant)
Vercel