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

Add section about migrating from next/image to next/future/image #39270

Merged
merged 6 commits into from
Aug 2, 2022

Conversation

styfle
Copy link
Member

@styfle styfle commented Aug 2, 2022

This expands on the previous PR #38978 with a section on migrating

```css
max-width: 100%;
height: auto;
**intrinsic: next/image**
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ijjk Ok I think I got a decent table in b69feb1

@styfle styfle requested a review from ijjk August 2, 2022 23:16
Copy link
Member

@ijjk ijjk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kodiakhq kodiakhq bot merged commit 213c42f into canary Aug 2, 2022
@kodiakhq kodiakhq bot deleted the update-next-future-docs-migration branch August 2, 2022 23:23
<td>

```jsx
import Image from 'next/image'
Copy link
Member

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.
CleanShot 2022-08-02 at 19 45 07@2x

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} />
}

Copy link
Member

@leerob leerob Aug 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CleanShot 2022-08-03 at 10 54 38@2x

Feedback we recieved

Copy link
Member

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 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leerob @ijjk PR with a quick hack: #39309

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
created-by: Next.js team PRs by the Next.js team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants