Next.js Discord

Discord Forum

INVALID_IMAGE_OPTIMIZE_REQUEST

Unanswered
Sloth bear posted this in #help-forum
Open in Discord
Avatar
Sloth bearOP
https://catering-henna.vercel.app/

https://catering-henna.vercel.app/_next/image?url=%2Flogos%2Flogo_transparent.png&w=640&q=75

why am i getting this error?

the images show up on localhost but dont work on vercel

my next config
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: 'https',
        hostname: '**.vercel.app',
      },
    ],
  }

};

export default nextConfig;


<Image         src="/logos/logo_transparent.png"
width={400}
height={400}
alt="Centro Italian Catering"
priority
className="w-1/2 sm:w-1/2"
/>

10 Replies

Avatar
Sun bear
try this:

import Image from 'next/image' import Logo from '[your-path-to-the-image]/logo/logo_transparent.png' export default function YourComponent() { return ( <Image src={Logo} // etc...
Avatar
Sloth bearOP
that worked for some reason....
thank you!
wait i just did that for 1
and all magically work now...
i think
hmmm
the Logos dir was L capital in the repo
but small in my code
that might have been the issue