next/Image not working when deployed manually through netlify cli

I have switched the implementation from next/Image to vanilla in https://remarkable-nasturtium-0c5200.netlify.app/
but I would like to know why does not work with netlify, I disabled image post-processing in netlify.

netlify.toml
[[plugins]]
package = "@netlify/plugin-nextjs"

[build]
command = "npm run build"
publish = ".next"

below code works

{/* eslint-disable-next-line @next/next/no-img-element */}
        <img
          src="/static/images/ai-hero-desktop.png"
          height={264}
          width={768}
          alt="hero"
          style={{ width: '100%', height: 'auto' }}
        />

Does not work (network error 500)

        <Image
          src="/static/images/ai-hero-desktop.png"
          height={264}
          width={768}
          alt="hero"
          style={{ width: '100%', height: 'auto' }}
        />

Hi @Vikram710 :wave:t6: ,

Welcome to the forums and thanks for reaching out! :netliconfetti: I can’t find the site connected to this account.

Can you please provide the following?

  • site slug/site name
  • your project repo
  • a full copy of your latest deploy log
  • what you have already tried to resolve the issue
  • any error messages you have received in your terminal window or in the developer console

Site name: remarkable-nasturtium-0c5200
repo: private
deploy logs

12:39:30 PM: Starting post processing
12:39:31 PM: Post processing - HTML
12:39:31 PM: Post processing - header rules
12:39:31 PM: Post processing - redirect rules
12:39:31 PM: Post processing done
12:39:31 PM: Section completed: postprocessing
12:39:32 PM: Site is live ✨

I have tried setting NEXT_DISABLE_EDGE_IMAGES = true
I didn’t notice any error messages

Hi @Vikram710,

I think the issue only occurs when trying to deploy from CLI. About the CLI problem, it seems to be a little tough to handle.

The workaround is to use either a GIT based deploy or a ubuntu based system.