-
Notifications
You must be signed in to change notification settings - Fork 174
Add configuration option to skip image processing #320
Conversation
In some cases, developers may want to skip image processing entirely. This may be useful for a site that is using an image CDN such as cloudinary: the cdn provides transformations, so we don't need to use Gatsby's transformation layer.
|
I would suggest using the term "skipFileDownloads" as the image processing is being done by other plugins on all file nodes. So it's not really skipping image processing, its skipping creating File Nodes for the images. "skipFileDownloads" is lifted from the Drupal Plugin, the WP Plugin uses "createFileNodes". |
Per feedback from @raae, this option does not actually stop images from being processed, as that would be done by other parts of the Gatsby ecosystem. Rather, this option solely prevents the downloading of media files & sourced into File Nodes.
|
@raae that's a great point. just submitted that change! |
|
Hi friends, Thanks! |
remidej
left a comment
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.
Thanks for the PR, this is a nice improvement! Just a small requested change on the readme, otherwise I think it can be shipped in the next release. Sorry for the time it took to review
| } | ||
| ``` | ||
|
|
||
| If you do not want this plugin to download your media (images, videos, and file attachments), you can use the `skipFileDownloads` configuration option |
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.
In the PR description you say:
This may be useful for a site that is using an image CDN such as cloudinary: the CDN provides transformations, so we don't need to use Gatsby's transformation layer.
I think it would be nice to add that here to, to make it more clear why users may want to use that option. And also mention that it would reduce build times
remidej
left a comment
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.
Merging this as we want to ship a release soon, and the readme can be improved later. Thanks again.
In some cases, developers may want to skip image processing entirely. This may be useful for a site that is using an image CDN such as cloudinary: the CDN provides transformations, so we don't need to use Gatsby's transformation layer. This PR adds such an option.
Relevant issues: #305