gatsbyjs/gatsby · error

Missing allowed URLs in your Netlify configuration. Add foll

Error message

Missing allowed URLs in your Netlify configuration. Add following to your netlify.toml:
```toml
[images]
remote_images = [
${entriesToAddToToml}]
```

What it means

Configuration warning from the Netlify adapter: one or more remote image URL patterns used by gatsby-image are not covered by the allowed regexes in netlify.toml. It fires when the [images] remote_images entries are missing and lists the exact lines to add so Netlify's image CDN will transform those URLs.

Source

Thrown at packages/gatsby-adapter-netlify/src/allowed-remote-urls.ts:42

      const isAlreadyAllowed = allowedUrlsInNetlifyTomlRegexes.some(
        allowedRegex => allowedRegex.test(remoteFileAllowedUrl.urlPattern)
      )

      if (!isAlreadyAllowed) {
        missingAllowedUrlsInNetlifyToml.push(remoteFileAllowedUrl.regexSource)
      }
    }

    if (missingAllowedUrlsInNetlifyToml.length > 0) {
      const entriesToAddToToml = `${missingAllowedUrlsInNetlifyToml
        .map(
          missingAllowedUrlInNetlifyToml =>
            `  ${JSON.stringify(missingAllowedUrlInNetlifyToml)}`
        )
        .join(`,\n`)},\n`

      if (typeof cfg.config.images?.remote_images === `undefined`) {
        reporter.warn(
          `Missing allowed URLs in your Netlify configuration. Add following to your netlify.toml:\n\`\`\`toml\n[images]\nremote_images = [\n${entriesToAddToToml}]\n\`\`\``
        )
      } else {
        reporter.warn(
          `Missing allowed URLs in your Netlify configuration. Add following entries to your existing \`images.remote_images\` configuration in netlify.toml:\n\`\`\`toml\n${entriesToAddToToml}\`\`\``
        )
      }
    }
  } else {
    reporter.verbose(`[gatsby-adapter-netlify] no netlify.toml found`)
  }
}

View on GitHub (pinned to e85d62f177)

Solutions

  1. Copy the printed remote_images TOML block into netlify.toml so Netlify Image CDN allows the source plugin's remote image URL patterns
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/gatsby-adapter-netlify/src/allowed-remote-urls.ts:42 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of gatsbyjs/gatsby@e85d62f177 (2026-08-26). Data as JSON: /api/errors/33de33065adcc867. Report an issue: GitHub.