Skip to content

bug: images return 404 if not present in disk (when using live preview - before github merge) #1459

@tresorama

Description

@tresorama

Problem

If a collection uses:

  • a fields.image
  • or a content components the use fields.image in 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

  1. 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?
  2. Is this expected behavior, and we should handle the redirect in the backend server ?
  3. Or did I configure my build incorrectly and should keystatic handle this case without redirects on my side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions