Thinkmill / Thinkmill/keystatic
bug: images return 404 if not present in disk (when using live preview - before github merge)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 159
- Avg merge
- 21h 41m
- Merged PRs (30d)
- 2
Description
Problem
If a collection uses:
- a
fields.image - or a content components the use
fields.imagein its schema
and:
storage.kind=github- or the current request is for a Live Preview draft (Live Preview forces
storage.kind=github)
Every images file return 404 because the URL of the image point to the Backend where keystatic runs, instead of github, and of course the backend disk doesn't have the file yet.
Follow up question
- Keystatic, when in github mode, fetch collection entry from github by crafting a Graph QL URL on the fly. Does Keystatic also traverse collection fields and does the same with images?
- Is this expected behavior, and we should handle the redirect in the backend server ?
- Or did I configure my build incorrectly and should keystatic handle this case without redirects on my side?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the 404 with a collection using fields.image while storage.kind=github and Live Preview is active. Trace how image URLs are produced for GitHub-backed entries and compare that with the backend server path. Done means the expected image behavior is established and verified for both GitHub mode and Live Preview.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100