Skip to content

Commit

Permalink
fix(docs): add note for exception when using gatsby-source-con… (#15926)
Browse files Browse the repository at this point in the history
* fix(docs): add note for exception when using gatsby-source-contentful

Using gatsby-transformer-sharp along with gatsby-source-contentful, while using the default behavior of the source plugin to link to Contentful's CDN instead of downloading the assets to the to the local filesystem, results in a warning during compiling.

* Update packages/gatsby-transformer-sharp/README.md

Co-Authored-By: Kitten King <[email protected]>

* Update packages/gatsby-transformer-sharp/README.md

* Update packages/gatsby-transformer-sharp/README.md

* fix: prettier
  • Loading branch information
jokokoloko authored and gillkyle committed Aug 7, 2019
1 parent 4478084 commit 810174d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby-transformer-sharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ module.exports = {
}
```

Please note that you must have a source plugin (which brings in images) installed in your project. Otherwise no `ImageSharp` nodes can be created for your files. Examples would be [`gatsby-source-filesystem`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-filesystem) or source plugins for (headless) CMSs like [`gatsby-source-wordpress`](https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-wordpress).
Please note that you must have a source plugin (which brings in images) installed in your project. Otherwise, no `ImageSharp` nodes can be created for your files. Examples would be [`gatsby-source-filesystem`](/packages/gatsby-source-filesystem) or source plugins for (headless) CMSs like [`gatsby-source-wordpress`](/packages/gatsby-source-wordpress).

**Note**: An exception to this is when using [`gatsby-source-contentful`](/packages/gatsby-source-contentful/), as the source plugin and the assets are not [downloaded to the local filesystem](https://www.gatsbyjs.org/packages/gatsby-source-contentful/#download-assets-for-static-distribution). By default, the `gatsby-source-contentful` plugin creates a `ContentfulAsset` node for every image with links to Contentful’s CDN, therefore it is not necessary to use `gatsby-transformer-sharp` together with `gatsby-source-contentful`.

## Parsing algorithm

Expand Down

0 comments on commit 810174d

Please sign in to comment.