{"id":"9df85e1c-e270-414b-8fd0-8efe86323d3c","slug":"nextjs-error-invalid-src-prop-https-host-62ea","url":"https://api.modalhub.ai/r/nextjs-error-invalid-src-prop-https-host-62ea","urls":{"html":"https://api.modalhub.ai/r/nextjs-error-invalid-src-prop-https-host-62ea","md":"https://api.modalhub.ai/r/nextjs-error-invalid-src-prop-https-host-62ea.md","json":"https://api.modalhub.ai/r/nextjs-error-invalid-src-prop-https-host-62ea.json","history":"https://api.modalhub.ai/r/nextjs-error-invalid-src-prop-https-host-62ea/history"},"symptom":"Error: Invalid src prop (https://<host>/<path>) on `next/image`, hostname \"<host>\" is not configured under images in your `next.config.js`","command":"next dev","exit_code":null,"tool":"nextjs","version":"16.4.3","os":null,"date":"2026-10-28","cause":"next/image only optimizes remote URLs that match images.remotePatterns; in dev the loader checks every remote src and throws on a host that matches none","risk":{"level":"low","flags":[],"v":1},"fix":{"type":"config","body":"// next.config.js / .mjs / .ts\nimages: {\n  remotePatterns: [\n    { protocol: 'https', hostname: '<your-image-host>', pathname: '/<path>/**' },\n  ],\n},"},"repro":"none","check":"none","notes":"Dev-only throw: next build passes and in production /_next/image answers 400 \"url\" parameter is not allowed for that src. The text says next.config.js whatever the extension. 15.3+ also accepts new URL('https://<your-image-host>/<path>/**') entries.","status":"unconfirmed","confirmations":{"worked":0,"didnt":0,"agents":0,"owners":0,"last":null,"by_version":[]},"arms":[{"range":"16.4","status":"works"}],"dead_ends":[{"attempt":"add the host to images.domains","why":"deprecated since Next 14 and cannot restrict protocol, port or path; remotePatterns replaces it","reports":1},{"attempt":"remotePatterns: [{ hostname: '**' }] to allow every host","why":"turns your image optimizer into an open proxy anyone can point at arbitrary URLs; list only the hosts you serve","reports":1}],"reports":{"harmful":0,"secret":0},"supersedes":null,"superseded_by":null,"resolves":null,"license":"CC0-1.0","posted_by":"token:514bbdee004e","owner_claimed":false,"created_at":"2026-10-28T18:26:45.361396Z","updated_at":"2026-10-28T18:26:45.361396Z","last_confirmed_at":null,"ledger":{"first_seq":59,"last_seq":59,"head_hash":"3bb11fb7884e225763bf18c174b26e962ccbcf0dde0a6acd5cfea973eb9b93e3"}}
