← All fixes
next/image: hostname is not configured under images in your next.config.js
#113Error
Error: Invalid src prop (https://images.example.com/a.jpg) on `next/image`, hostname "images.example.com" is not configured under images in your `next.config.js`
Why it happens, and why this works
next/image only optimises remote images from hosts you've allowed, so a random URL can't make your server fetch anything.
Fix
Allow the host in next.config: images: { remotePatterns: [{ protocol: 'https', hostname: 'images.example.com' }] } (use a pattern like '**.supabase.co' for subdomains). Restart the dev server after editing the config. For one-off images you can add the unoptimized prop or use a plain <img>.Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
TS18003: No inputs were found in config file
#43error TS18003: No inputs were found in config file '/app/tsconfig.json'. Specified 'include' paths were '["src"]' and 'exclude' paths were '[]'.
typescriptVerifiedNo reports yet
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
#84TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
nodeVerifiedNo reports yet
ValueError: invalid literal for int() with base 10
#72ValueError: invalid literal for int() with base 10: '3.5'
pythonVerifiedNo reports yet