我正在使用 Gatsby + WordPress 进行构建,WP 媒体库有 1000 多个项目;在每次新构建期间,这需要很长时间来下载:
如何让 gatsby-source-wordpress 同时获取多个图像?看起来它是按顺序获取它们的。
我当前的gatsby-source-wordpress gatsby-config.js选项:
resolve: `gatsby-source-wordpress`,
options: {
// the only required plugin option for WordPress is the GraphQL url.
url: process.env.WPGRAPHQL_URL,
schema: {
timeout: 30000,
perPage: 500,
requestConcurrency: 50,
},
type: {
MediaItem: {
localFile: {
requestConcurrency: 200,
},
},
},
},
Run Code Online (Sandbox Code Playgroud)
想知道这是否需要前端调整,或者需要调整服务器端。
requestConcurrency: 200中的设置似乎localFile不会影响这里的任何内容。