fix: improve support for next/image component #564
+15
−12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request addresses several issues and enhances the functionality of our image component:
example
This is default image props.
It is working !
Additionally, during the development process, we identified the following issues:
Component Usage Inconsistency: While the project code suggested that nextImage could be used independently of forceCustomImages, in practice, both needed to be passed together for proper functionality.
Rendering Logic Ambiguity: Although components.Image is imported and props are passed to it, when nextImage is provided, the component actually imports Image from nextImage for rendering. This inconsistency in logic exists.
These changes allow for more flexible usage of next/image without requiring predefined dimensions, solve compatibility issues between our custom Image component and next/image, and improve image tooltips and accessibility. We are also aware of the additional issues discovered, which may require further improvements in the future.
Notion Test Page ID