{"record":{"id":"708549b8f74a0b97","repo":"gatsbyjs/gatsby","slug":"pluginoptions-type-mediaitem-limit-is-an-disallowe","errorCode":null,"errorMessage":"PluginOptions.type.MediaItem.limit is an disallowed plugin option.\nPlease remove the MediaItem.limit option from gatsby-config.js (currently set to ${userPluginOptions?.type?.MediaItem?.limit})\n\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types. For example as a featured image, in custom fields, or in post_content.","messagePattern":"PluginOptions\\.type\\.MediaItem\\.limit is an disallowed plugin option\\.\nPlease remove the MediaItem\\.limit option from gatsby-config\\.js \\(currently set to (.+?)\\)\n\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types\\. For example as a featured image, in custom fields, or in post_content\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts","lineNumber":51,"sourceCode":"        )\n      } else if (!warnedAboutMediaItemLazyNodes) {\n        warnedAboutMediaItemLazyNodes = true\n        helpers.reporter.warn(\n          formatLogMessage(\n            `\\nThe type.MediaItem.lazyNodes option wont be supported in Gatsby v4+ due to query running using JS workers in PQR (Parallell Query Running). lazyNodes creates nodes in GraphQL resolvers and PQR doesn't support that.\\n\\nThis option works with your current version of Gatsby but will stop working in Gatsby v4+.\\n\\nIf you would like to prevent gatsby-source-wordpress from fetching File nodes for each MediaItem node, set the type.MediaItem.createFileNodes option to false instead.\\n`\n          )\n        )\n      }\n\n      return userPluginOptions\n    },\n  },\n  {\n    name: `pluginOptions.type.MediaItem.limit is not allowed`,\n    test: ({ userPluginOptions }): boolean =>\n      !!userPluginOptions?.type?.MediaItem?.limit,\n    processor: ({ helpers, userPluginOptions }): void => {\n      helpers.reporter.panic(\n        formatLogMessage(\n          `PluginOptions.type.MediaItem.limit is an disallowed plugin option.\\nPlease remove the MediaItem.limit option from gatsby-config.js (currently set to ${userPluginOptions?.type?.MediaItem?.limit})\\n\\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types. For example as a featured image, in custom fields, or in post_content.`\n        )\n      )\n    },\n  },\n  {\n    name: `queryDepth-is-not-a-positive-int`,\n    test: ({ userPluginOptions }: IProcessorOptions): boolean =>\n      typeof userPluginOptions?.schema?.queryDepth !== `undefined` &&\n      (!isInteger(userPluginOptions?.schema?.queryDepth) ||\n        userPluginOptions?.schema?.queryDepth <= 0),\n    processor: ({\n      helpers,\n      userPluginOptions,\n    }: IProcessorOptions): IPluginOptions => {\n      helpers.reporter.log(``)\n      helpers.reporter.warn(","sourceCodeStart":33,"sourceCodeEnd":69,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/8b06340921ffdf23125a365b9c9923690cb62ce6/packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts#L33-L69","documentation":"Error \"PluginOptions.type.MediaItem.limit is an disallowed plugin option.\nPlease remove the MediaItem.limit option from gatsby-config.js (currently set to ${userPluginOptions?.type?.MediaItem?.limit})\n\nMediaItem nodes are automatically limited to 0 and then fetched only when referenced by other node types. For example as a featured image, in custom fields, or in post_content.\" thrown in gatsbyjs/gatsby.","triggerScenarios":"Thrown at packages/gatsby-source-wordpress/src/steps/process-and-validate-plugin-options.ts:51 when the library encounters an invalid state.","commonSituations":"Occurs when the disallowed type.MediaItem.limit plugin option is set. Remove the MediaItem.limit option from gatsby-config.js; MediaItems are fetched on demand when referenced.","solutions":["Remove the type.MediaItem.limit option from gatsby-config.js.","MediaItems are fetched on demand when referenced; no manual limit is needed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8b06340921ffdf23125a365b9c9923690cb62ce6","analyzedAt":"2026-08-13T02:36:21.405Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}