-
Notifications
You must be signed in to change notification settings - Fork 26.1k
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
Add section about migrating from next/image
to next/future/image
#39270
Conversation
```css | ||
max-width: 100%; | ||
height: auto; | ||
**intrinsic: next/image** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use a table to organize the legacy/future comparison a bit more together similar to our page config allowed/not allowed table? https://github.com/vercel/next.js/blob/canary/errors/invalid-page-config.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tables don't render nicely right now. For example https://nextjs.org/docs/api-reference/next/image#layout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
<td> | ||
|
||
```jsx | ||
import Image from 'next/image' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit strange when live.
Thoughts on just doing section headers to for each and just including the after code snippet with a comment in there?
// Replaces default usage of `next/image`
import Image from 'next/future/image'
import img from '../img.png'
const css = { maxWidth: '100%', height: 'auto' }
export default function Page() {
return <Image src={img} style={css} />
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on just doing section headers to for each and just including the after code snippet with a comment in there?
Sounds good to me, would be curious if tables would render better if we hid the sidebar 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This expands on the previous PR #38978 with a section on migrating