Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextImage component not working properly #97

Closed
mukhlisakbr opened this issue Feb 1, 2022 · 1 comment · Fixed by #113
Closed

NextImage component not working properly #97

mukhlisakbr opened this issue Feb 1, 2022 · 1 comment · Fixed by #113

Comments

@mukhlisakbr
Copy link

mukhlisakbr commented Feb 1, 2022

I think the NextImage component not properly optimizing images because next/image has been set to layout='responsive'. If I look in the components.tsx page there is a usage example, but when the image is loaded it is not actually optimized

produced image URL: https://tsnext-tw.thcl.dev/_next/image?url=%2Ffavicon%2Fapple-icon-180x180.png&w=1920&q=75

it should be w=180 but because layout='responsive' it uses screen width/parent container size as image width which is w=1920 in my case. I think just leaving it as default layout or removing the layout prop and fixed image size will be working fine

@theodorusclarence
Copy link
Owner

I see, so the responsive is best optimized for full bleed images?

Without the layout responsive, how about for smaller screen like 320 width (iphone)? Will it optimize them?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants