-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
docs(gatsby-plugin-image): Update API in readme #28134
Conversation
@@ -226,11 +226,12 @@ export const query = graphql` | |||
|
|||
### Upgrading from the gatsby-image@2 | |||
|
|||
You can use the compat layer to make the transformation easier. | |||
We will be releasing a codemod to automatically update your queries and imports. In the meantime you can use the compat layer to make the transformation easier. This will be removed when we leave beta, but for now it allows you to try the component with your existing queries. |
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.
We will be releasing a codemod to automatically update your queries and imports. In the meantime you can use the compat layer to make the transformation easier. This will be removed when we leave beta, but for now it allows you to try the component with your existing queries. | |
We will be releasing a codemod to automatically update your queries and imports. In the meantime, you can use the compat layer to make the transformation easier. This will be removed when we leave beta, but for now, it allows you to try the component with your existing queries. |
- **outputPixelDensities**: | ||
A list of image pixel densities to generate. It will never generate images larger than the source, and will always include a 1x image. | ||
Default is [ 1, 2 ] for fixed images, meaning 1x, 2x, 3x, and [0.25, 0.5, 1, 2] for fluid. In this case, an image with a fluid layout and width = 400 would generate images at 100, 200, 400 and 800px wide`, | ||
- **sizes**: |
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.
Sizes is listed twice.
- **blurredOptions**: Options for the low-resolution placeholder image. Set placeholder to "BLURRED" to use this | ||
- width | ||
- toFormat | ||
- **tracedSVGOptions**: Options for traced placeholder SVGs. You also should set placeholder to "SVG". |
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.
Worth noting that these options used to be called X in some migration section below?
49551b8
to
0061105
Compare
Updates the APIs in the gatsby-plugin-image readme