Next.js Discord

Discord Forum

Invalid src prop error with Image Component

OMikkel posted this in #help-forum
Open in Discord
Hey i am getting an error with the Image Component in dev mode.
I cant figure out why it works in prod fine, but in dev it throws an error.

I am using Nextjs 14 and using the new remotePatterns in the nextConfig.

Here is my config:
/** @type {import('next').NextConfig} */
const nextConfig = {
    images: {
        formats: ['image/webp'],
        remotePatterns: [
                protocol: "https",
                hostname: "",

module.exports = nextConfig

Error: Invalid src prop ( on `next/image`, hostname "" is not configured under images in your `next.config.js`
See more info:

Does anyone know the reason why it is not recognising the set config.

0 Replies