Skip to content

Support media/public folders for Image widget #497

@ffplexim

Description

@ffplexim

First, thanks a lot for creating and maintaining Sveltia CMS!

According to the Decap CMS docs (https://decapcms.org/docs/widgets/#image) and the Sveltia CMS type definitions you can define media_folder and public_folder for an image widget.

It doesn't seem to be used by Sveltia CMS though. More precisely, getAssetByAbsolutePath() in src/lib/services/assets/index.js will not look at the folders specified there, which results in the preview image not being shown, and when clicking "Replace" I only have "Global assets". (The folders for this image widget are a sub-folder of the global images directory.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions