keystatic
keystatic copied to clipboard
bug: images return 404 if not present in disk (when using live preview - before github merge)
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?