-
Notifications
You must be signed in to change notification settings - Fork 100
Stop all medias to be downloading ? #150
Comments
Hi @JimCaignard , What you can try in the meantime to stop the downloading from happening is to override the type option on MediaItem nodes that downloads the files. Try this {
resolve: `gatsby-plugin-wordpress-experimental`,
options: {
type: {
MediaItem: { beforeChangeNode: () => {} }
}
}
} I'm not entirely sure if there will be any side effects to doing this, but we will definitely be adding a more official API for this after we ship the stable release of this plugin. Thanks for this feature request! |
I tried the above suggestions @TylerBarnes but it doesn't seem to make a difference in my case. Is there no way to disable this so I can proceed forward with getting a build working? |
Thanks @TylerBarnes for your work and the solution you gave me ! Any ideas or other solution to make it works again ? |
@JimCaignard on the latest version try this config:
|
@TylerBarnes it's not working : it's doing that and never stop.. |
@JimCaignard if you can provide a reproduction or /graphql endpoint URL I can take a look. Thanks |
@TylerBarnes I am having similar issue, not sure if it's a duplicate but I've included more info: #228 |
I would absolutely love this. I've been trying to get it running for hours and it always fails when downloading media files. All my media is on a separate CDN too - I can't fathom why Gatsby would need to download it all. Nothing suggested above it stopping it from doing so. It REALLY wants those images. For now I'm giving up and going back to trusty ol' If it helps, my endpoint is https://atomos.yourcreative.com.au/graphql. It always fails on the same image (although the image is very much valid and exists). Regardless of the error, I just want it to not download/format/do anything with the media items. If it can just skip them, we're in business. |
Hey everyone, I just had another look at this and you can achieve it with the following plugin options. I tested it on your endpoint @MitchEff and it works great. {
resolve: `gatsby-source-wordpress-experimental`,
options: {
url: process.env.WPGRAPHQL_URL,
html: {
createStaticFiles: false,
useGatsbyImage: false,
},
type: {
MediaItem: { lazyNodes: true },
},
},
}, If you query for |
Actually, re-opening this so we can make sure we document it in our upcoming documentation push! |
Hi all,
i'm using this plugin with a large media website and so i use a CDN for all images and i'would like to
stop downloading all the media at every build as i'm not using them at all..
I find the option to disable gatsby image but not to stop the downloading..
Ideas ?
The text was updated successfully, but these errors were encountered: