Next/images dont show up


netlify.toml :
package = “@netlify/plugin-nextjs”

external_node_modules = [“sharp”]
included_files = [“node_modules/sharp/**/*”]

command = “npm run build”
publish = “.next”

images with tag < img > show up but next < Image > dont show up.

error : IPX Error: Error: \nSomething went wrong installing the "sharp" module\n\nCannot find module ‘…/build/Release/sharp-linux-x64.node’\nRequire stack:\n- /var/task/node_modules/ipx/node_modules/sharp/lib/sharp.js\n- /var/task/node_modules/ipx/node_modules/sharp/lib/constructor.js\n- /var/task/node_modules/ipx/node_modules/sharp/lib/index.js\n\nPossible solutions:\n- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"\n- Install for the current linux-x64 runtime: "npm install --platform=linux --arch=x64 sharp"\n- Consult the installation documentation: sharp - High performance Node.js image processing

Deploys with CLI would not work unless you use CLI on an Ubuntu machine.

More details:

1 Like

Could you direct me towards using netlify build. I have a private repo so I cannot use github. My site uses next ISR and server side rendering.

Hi @aymen , here are our docs on using netlify build

Hope it helps!