Skip to content

On nonexistent image request, next/image hangs and eventually returns a 504 #33441

Description

@inside

Run next info (available from version 12.0.8 and up)

    Operating System:
      Platform: linux
      Arch: x64
      Version: #51~20.04.1-Ubuntu SMP Fri Jan 7 06:51:40 UTC 2022
    Binaries:
      Node: 16.13.0
      npm: 6.14.15
      Yarn: 1.22.15
      pnpm: 6.11.0
    Relevant packages:
      next: 12.0.9-canary.0
      react: 17.0.2
      react-dom: 17.0.2

What version of Next.js are you using?

12.0.9-canary.0

What version of Node.js are you using?

16.13.0

What browser are you using?

Chrome

What operating system are you using?

Linux

How are you deploying your application?

Local application

Describe the Bug

On nonexistent image request, next/image hangs and eventually returns a 504.

This happens in a local next app and also in our production app.

Expected Behavior

next/image should return a 404

To Reproduce

Please have a look at this repo where you can find the steps to reproduce: https://github.com/inside/next-image-app

Metadata

Metadata

Assignees

No one assigned

    Labels

    Image (next/image)Related to Next.js Image Optimization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions