Skip to content

Docs: Incorrect information about Astro's asset directory requirement #1508

@eremannisto

Description

@eremannisto

The recipe "Use Astro's Image component with the Keystatic image field" states:

To make use of Astro's <Image /> component, you need to store your images in the src/assets directory in your project.

This is partially incorrect. Astro does not require images to be in a src/assets directory. According to Astro's own documentation, assets is simply a popular folder name convention, and images can be stored in any subdirectory under src to benefit from Astro's image optimization. The only requirement is that they live somewhere within src.

This distinction matters because it may lead users to believe they cannot organize their Keystatic-managed files in a custom directory structure (e.g. src/keystatic/assets/), when in fact any src subdirectory works as long as the directory and publicPath options are configured accordingly.

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