vercel / vercel/next.js

generated images do not work with GitHub Pages and static export

Open
#82,177 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Output
Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

Link to the code that reproduces this issue

https://github.com/lifeiscontent/lifeiscontent.net

To Reproduce

I think due to the og images not having a file extension in the output, GitHub pages does not properly serve the generated images.

they work great with next dev but after deploying to GitHub pages it seems to serve the file as an octet-stream file

Current vs. Expected behavior

expected behavior would be to have file extensions during static export so static file providers handle it gracefully.

Provide environment information
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 65536
  Available CPU cores: 10
Binaries:
  Node: 22.17.1
  npm: 10.9.2
  Yarn: N/A
  pnpm: 10.13.1
Relevant Packages:
  next: 15.4.4 // Latest available version is detected (15.4.4).
  eslint-config-next: 15.4.4
  react: 19.1.1
  react-dom: 19.1.1
  typescript: 5.8.3
Next.js Config:
  output: export
Which area(s) are affected? (Select all that apply)

Output

Which stage(s) are affected? (Select all that apply)

Other (Deployed)

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked reproduction repository and compare generated OG image files and response handling under next dev and output: export. Verify the deployed GitHub Pages files and content types; done means static export produces image files with extensions that GitHub Pages serves as images rather than octet-stream files.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, next.js, react
Domain
build-system, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.