NextJS Image component not working

More of a bug report than a “support” question as I’m not using this feature, just curious.

NextJS’s Image component next/image | Next.js does not work on Netlify.

Returned error:

 {"errorType":"Error","errorMessage":"Could not find MIME for Buffer <null>","trace":["Error: Could not find MIME for Buffer <null>","    at Jimp.parseBitmap (/var/task/src/node_modules/@jimp/core/dist/utils/image-bitmap.js:187:15)","    at Jimp.parseBitmap (/var/task/src/node_modules/@jimp/core/dist/index.js:431:32)","    at /var/task/src/node_modules/@jimp/core/dist/index.js:373:15","    at /var/task/src/node_modules/@jimp/core/dist/index.js:115:14","    at /var/task/src/node_modules/@jimp/core/dist/request.js:48:9","    at IncomingMessage.<anonymous> (/var/task/src/node_modules/phin/lib/phin.compiled.js:1:2100)","    at IncomingMessage.emit (events.js:326:22)","    at endReadableNT (_stream_readable.js:1241:12)","    at processTicksAndRejections (internal/process/task_queues.js:84:21)"]}

Image in question is in the footer.

More details:

  • The code is cloned from one of the official starters
  • Image is local file from public dir; no next config
  • Statically rendered (getStaticProps)

I have read this thread but not sure if it’s the same case as discussed there.

Does the NextJS Image component only work with server-rendered pages (as it requires a server to process the image)? If yes, wouldn’t it be a good idea to add a warning in GitHub - netlify/next-runtime: The Next.js Runtime allows Next.js to run on Netlify with zero configuration ?

hi there @ekafyi !

This sounds like a tricky issue - would you do me a favour and file an issue on this repo

if you are still experiencing this problem?

thanks!