Describe the bug
Using the FrontMatter UI for a field with type "image", the inserted path is relative to the project root instead of "frontMatter.content.publicFolder", making it so that direct use of the image URL by my website is not possible (for the running site, the URLs are relative to the public folder, not to the repo root).
This is something in between a bug (since the current behavior is surprising and has no workaround) and a feature request (since it might currently be working as intended).
To Reproduce
Steps to reproduce the behavior:
- Add images to a static directory
projects/site/static
- Set
"frontMatter.content.publicFolder" to projects/site/static
- Add an image field to the default content-type, e.g.
{
"frontMatter.taxonomy.contentTypes": [
{
"name": "default",
"pageBundle": false,
"fileType": "md",
"fields": [
{
"title": "Image Path",
"name": "url",
"type": "image",
"isPreviewImage": true
}
]
}
]
}
- In a Markdown file, open the Front Matter sidebar and scroll to the Image Path field
- Click the image icon, browse for an image.
- Hover over the vertical '...' and click the
+ icon to insert the path
- Observe that the inserted path starts with
projects/site/static
Expected behavior
I expect the "frontMatter.taxonomy.contentTypes" part of the path to be excluded from the inserted path, since all paths for the actual content are relative to the publicFolder root, not the repo root.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: Windows 11 (Insiders)
- Browser: Chrome (latest)
- FrontMatter Version: latest of both release and beta extensions
Describe the bug
Using the FrontMatter UI for a field with type "image", the inserted path is relative to the project root instead of
"frontMatter.content.publicFolder", making it so that direct use of the image URL by my website is not possible (for the running site, the URLs are relative to the public folder, not to the repo root).This is something in between a bug (since the current behavior is surprising and has no workaround) and a feature request (since it might currently be working as intended).
To Reproduce
Steps to reproduce the behavior:
projects/site/static"frontMatter.content.publicFolder"toprojects/site/static{ "frontMatter.taxonomy.contentTypes": [ { "name": "default", "pageBundle": false, "fileType": "md", "fields": [ { "title": "Image Path", "name": "url", "type": "image", "isPreviewImage": true } ] } ] }+icon to insert the pathprojects/site/staticExpected behavior
I expect the "frontMatter.taxonomy.contentTypes" part of the path to be excluded from the inserted path, since all paths for the actual content are relative to the publicFolder root, not the repo root.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):