Note: The normal "insert image" button in media view (+"button on the image) works as expected, giving relative path.

This bug would not be very annoying if the absolute path vscode-frontmatter compute wasn't erroneous. This computation is based on filepath in my filesystem, and not based on the previewPath properties. Hugo translate filepath into an url-friendly version when generating site, and the absolute path calculation that does vs-code-frontmatter is not the same. Using a path based on previewPath (wich is supposed to work) would be less erroneous.
But what I expect and prefer, is to get a relative path as specified in the docs. Output is nicer, and I can pay attention for subdirectories of my post, so that they have url-friendly names that will not be transformed neither by Hugo, nor by vscode-frontmatter.
Device:
OS: Linux
Front Matter CMS Version : 10.7.0
Browser : firefox
Additional context
My content type is in "pageBundle" mode.
**Describe the bug**
In media Snippets, the [[&mediaUrl]] placeHolder does not give relative path but an erroneous absolute path).
**To Reproduce**
This is in my frontmatter.json
```
"Image zoomable légendable": {
"description": "Cliquer sur l'image l'affichera en plus grand, et affichera la légende si elle est définie",
"body": "{{< image src=\"[[&mediaUrl]]\" caption=\"[[legende]]\" >}}",
"isMediaSnippet": true,
"fields": [
{
"name": "legende",
"title": "Légende",
"type": "string",
"default": ""
}
]
}
```
* Edited post path : [[workspace]]/content/blog/2019/André Mitton piste cyclable stationnable/index.md
* Choosen media path: [[workspace]]/content/blog/2019/André Mitton piste cyclable stationnable/img/photo3.jpg
When I am editing my post, click on the media button, and then choose the snippets on the desired image, vs-code frontmatter inputs in my post:
```
{{< image src="/content/blog/2019/André%20Mitton%20piste%20cyclable%20stationnable/img/photo3.jpg" caption="" >}}
```
I expected it to input
```
{{< image src="img/photo3.jpg" caption="" >}}
```
Note: The normal "insert image" button in media view (`+"`button on the image) works as expected, giving relative path.
```

```
This bug would not be very annoying if the absolute path vscode-frontmatter compute wasn't erroneous. This computation is based on filepath in my filesystem, and not based on the previewPath properties. Hugo translate filepath into an url-friendly version when generating site, and the absolute path calculation that does vs-code-frontmatter is not the same. Using a path based on previewPath (wich is supposed to work) would be less erroneous.
But what I expect and prefer, is to get a relative path as specified in the docs. Output is nicer, and I can pay attention for subdirectories of my post, so that they have url-friendly names that will not be transformed neither by Hugo, nor by vscode-frontmatter.
**Device:**
- OS: Linux
- Front Matter CMS Version : 10.7.0
- Browser : firefox
**Additional context**
My content type is in "pageBundle" mode.
<!-- github-sync-id:2809973146 -->
Thanks @lamyseba for opening the issue. It was related to the page bundle. I have added support for this, and you are able to try it out in the latest beta version.
Thanks @lamyseba for opening the issue. It was related to the page bundle. I have added support for this, and you are able to try it out in the latest beta version.
https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta
<!-- github-comment-id:2639454606 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Describe the bug
In media Snippets, the &mediaUrl placeHolder does not give relative path but an erroneous absolute path).
To Reproduce
This is in my frontmatter.json
When I am editing my post, click on the media button, and then choose the snippets on the desired image, vs-code frontmatter inputs in my post:
I expected it to input
Note: The normal "insert image" button in media view (
+"button on the image) works as expected, giving relative path.This bug would not be very annoying if the absolute path vscode-frontmatter compute wasn't erroneous. This computation is based on filepath in my filesystem, and not based on the previewPath properties. Hugo translate filepath into an url-friendly version when generating site, and the absolute path calculation that does vs-code-frontmatter is not the same. Using a path based on previewPath (wich is supposed to work) would be less erroneous.
But what I expect and prefer, is to get a relative path as specified in the docs. Output is nicer, and I can pay attention for subdirectories of my post, so that they have url-friendly names that will not be transformed neither by Hugo, nor by vscode-frontmatter.
Device:
Additional context
My content type is in "pageBundle" mode.
Thanks @lamyseba for opening the issue. It was related to the page bundle. I have added support for this, and you are able to try it out in the latest beta version.
https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-front-matter-beta
Thank you @estruyf , beta version works for me !
Version 10.8.0 has been released