-
Notifications
You must be signed in to change notification settings - Fork 26k
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
Issues with new next/image component #18476
Comments
We're trialing some changes to |
User verified |
next/image - facing issue in production env, images are getting 504 timeout error |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
I used the image component as a drop-in replacement for img, but encountered the following issues:
key
prop, that addedsrc
again as the key. If I did not do this, and I have a series of images in a list, when the list updates the images would not change, and would remain as the previous images. Adding thekey
prop fixed this, I believe theImage
component should do this internally.company-logo
is the parent container of the image:To Reproduce
Issue 1:
Issue 2:
img
component, try display logos from the clearbit logo API (or images that are not square) consistently, which will involve some css. Replaceimg
with next/Image, and notice your logos will no longer display correctly.Expected behavior
I expected when I replaced the
img
component with Next/Image everything would work as expected (my understanding may be wrong here! If so that's totally ok - the component is still awesome, and great work by everyone involved! Just adding these usage experiences as helpers!Screenshots
Issue 1:
Bad without
key
fix:Good with
key
fix:Issue 2:
Without css overrides:
With css overrides:
System information
Additional context
While the code for this is not open source, I'm happy to add contributors to the codebase or share snippets of code as much as possible to highlight issues, or test the fixes work.
Great work on this component and everything in next.js 10! with the fixes I've used, everything is working really well.
The text was updated successfully, but these errors were encountered: