Skip to content

Segmentation fault occurs when loading PNG, JPG images #24564

@angusryer

Description

@angusryer

What version of Next.js are you using?

10.1.4-canary.17

What version of Node.js are you using?

16.0.0

What browser are you using?

Chrome 90.0.4430.85

What operating system are you using?

macOS (Apple M1 w/ Big Sur 11.3)

How are you deploying your application?

Local only

Describe the Bug

Starting from a fresh create-next-app, I place a PNG or JPG image into the public folder, then add a <Image src="/myPngImage.png" layout="fill" /> to my index.js.

After the hot-reload completes, the dev server quits and gives me this error:

zsh: segmentation fault npm run dev

Expected Behavior

Image should appear and dev server should continue to run.

To Reproduce

  1. In the terminal, run create-next-app myApp && cd myApp
  2. Add a png or jpeg image to your project's public folder
  3. In index.js, add <Image src="/yourImage.png" layout="fill" />
  4. In the terminal, run npm run dev and wait until everything has compiled completely
  5. From your browser, access localhost:3000
  6. The image may to show up on the first load, so refresh the page

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions