Nextjs images 502 responses

The images were working fine on my previous deployment but I deployed some changes today and the images are not showing now. What happened? It returns following error

  1. 0: “Runtime.ImportModuleError: Error: Cannot find module ‘ipx’”
  2. 1: “Require stack:”
  3. 2: “- /var/task/node_modules/@netlify/ipx/dist/index.js”
  4. 3: “- /var/task/.netlify/functions-internal/_ipx/_ipx.js”
  5. 4: “- /var/task/_ipx.js”
  6. 5: “- /var/runtime/UserFunction.js”
  7. 6: “- /var/runtime/index.js”
  8. 7: " at _loadUserApp (/var/runtime/UserFunction.js:202:13)"
  9. 8: " at Object.module.exports.load (/var/runtime/UserFunction.js:242:17)"
  10. 9: " at Object. (/var/runtime/index.js:43:30)"
  11. 10: " at Module._compile (internal/modules/cjs/loader.js:1085:14)"
  12. 11: " at Object.Module._extensions…js (internal/modules/cjs/loader.js:1114:10)"
  13. 12: " at Module.load (internal/modules/cjs/loader.js:950:32)"
  14. 13: " at Function.Module._load (internal/modules/cjs/loader.js:790:12)"
  15. 14: " at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)"
  16. 15: " at internal/main/run_main_module.js:17:47"