Skip to content

Image Issue on Nginx #56038

Closed
Closed
@Iulian-Dragomirescu

Description

@Iulian-Dragomirescu

HI,
Image works in development and production (only locally, not remotely), but in nginx I get this error (from nginx console):

upstream image response failed for /assets/icons/gdpr.png TypeError: fetch failed
cause: ConnectTimeoutError: Connect Timeout Error

my folders
public/assets/icons/gdpr.png

        <Image
          onError={(e) => {
            console.error("Error loading image:", e);
          }}
          src="/assets/icons/gdpr.png"
          className="rounded-sm"
          alt="gdpr"
          width={100}
          height={100}
        />

i try to convert the image in webp.. same error
restart server.. same

and this:
"url" parameter is valid but upstream response is invalid
i receive from chrome exemple.com/_next/image?url=%2Fassets%2Ficons%2Fgdpr.png&w=256&q=75

image

Any ideea?

Thanks!

Additional information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Home
Binaries:
  Node: 18.17.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 13.5.3
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: N/A
Next.js Config:
  output: N/A

NEXT-1680

Metadata

Metadata

Assignees

No one assigned

    Labels

    linear: nextConfirmed issue that is tracked by the Next.js team.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions