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): Remove filesystem from config #29802

Merged
merged 3 commits into from
Mar 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,28 @@ The new Gatsby Image plugin is currently in beta, but you can try it out now and

## Getting started

First you need to install the following packages:
1. Install the following packages:

```shell
npm install gatsby-plugin-image gatsby-plugin-sharp gatsby-source-filesystem gatsby-transformer-sharp
```

You then need to add the plugins to your `gatsby-config.js`:
2. Add the plugins to your `gatsby-config.js`:

```js:title=gatsby-config.js
module.exports = {
plugins: [
`gatsby-plugin-image`,
`gatsby-plugin-sharp`,
`gatsby-source-filesystem`,
`gatsby-transformer-sharp`,
],
}
```

If you already have some of these plugins installed, please check that they're updated to the latest version.

Note that `gatsby-source-filesystem` is not included in this config. If you are sourcing from your local filesystem to use `GatsbyImage` please configure accordingly. Otherwise, downloading the dependency without configuration is sufficient.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this going to be confusing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My instinct is that we have to say something? And having them configure it for an arbitrary folder they aren't sourcing seems unhelpful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

cc: @meganesu Would love your take on this. Either way we need to change the existing config, so should figure out which option is the most helpful.

<!-- TODO: add exact minimum version when we reach GA -->

## Using the Gatsby Image components
Expand Down Expand Up @@ -199,4 +200,4 @@ If your site uses the old `gatsby-image` component, you can use a codemod to hel
npx gatsby-codemods gatsby-plugin-image
```

This will convert all GraphQL queries and components to use the new plugin. For more information see the full migration guide.
This will convert all GraphQL queries and components to use the new plugin. For more information see the full [migration guide](/docs/reference/release-notes/image-migration-guide/).