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

docs(gatsby-plugin-image): Update API in readme #28134

Merged
merged 3 commits into from
Nov 25, 2020
Merged

Conversation

ascorbic
Copy link
Contributor

Updates the APIs in the gatsby-plugin-image readme

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 17, 2020
@laurieontech laurieontech added status: needs docs review Pull request related to documentation waiting for review and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 17, 2020
@@ -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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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**:
Copy link
Contributor

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".
Copy link
Contributor

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?

@ascorbic ascorbic merged commit 9f91ba1 into master Nov 25, 2020
@delete-merged-branch delete-merged-branch bot deleted the docs/images-readme branch November 25, 2020 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs docs review Pull request related to documentation waiting for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants