Specify which field can be used for the preview image in the content type.
The issue raised by @appieschot on Twitter: https://twitter.com/appieschot/status/1443568883248492554?s=20
<!-- github-sync-id:1012237185 -->
This will be supported in the upcoming release where you can specify in your content type image field that it can be used as the preview image with the isPreviewImage property.
This will be supported in the upcoming release where you can specify in your content type image field that it can be used as the preview image with the `isPreviewImage` property.
```json
{
"title": "Article preview",
"name": "custom-image",
"type": "image",
"isPreviewImage": true
}
```
<!-- github-comment-id:931372791 -->
@appieschot this is now available for testing in the https://beta.frontmatter.codes version
More information: https://beta.frontmatter.codes/docs/content-types#field-properties
<!-- github-comment-id:931381733 -->
My images are stored in the /static folder (Hugo specific). When referencing you dont specify that folder and Hugo knows (https://gohugo.io/content-management/static-files/) any way we can configure that for preview's as well?
Even when specifying the preview URL correctly the image won't show up; it does show in the left pane as preview, but the dashboard shows an error image. Is there a place where I can look for logs?
Awesome work 🚀, two more questions though ;-):
- My images are stored in the /static folder (Hugo specific). When referencing you dont specify that folder and Hugo knows (https://gohugo.io/content-management/static-files/) any way we can configure that for preview's as well?
- Even when specifying the preview URL correctly the image won't show up; it does show in the left pane as preview, but the dashboard shows an error image. Is there a place where I can look for logs?
<!-- github-comment-id:932091352 -->
@appieschot did you specify the `frontmatter.content.publicfolder` setting with `static` as value?
https://frontmatter.codes/docs/settings#frontmatter.content.publicfolder
<!-- github-comment-id:932094695 -->
Learned something new; didn't know it would be that easy.
Image on the left is rendered using: <img src="https://file%2B.vscode-resource.vscode-webview.net/c%3A/git/sbx/weblog/static/wp-content/uploads/2021/cliflowexport.webp">
The image in the dashboard is: <img src="/wp-content/uploads/2021/cliflowexport.webp" alt="Flow missing export to logic app? Use the CLI for Microsoft 365" class="absolute inset-0 h-full w-full object-cover" loading="lazy">
Manually changing the URL only solves the problem.
Learned something new; didn't know it would be that easy.
Image on the left is rendered using:
```<img src="https://file%2B.vscode-resource.vscode-webview.net/c%3A/git/sbx/weblog/static/wp-content/uploads/2021/cliflowexport.webp">```
The image in the dashboard is:
```<img src="/wp-content/uploads/2021/cliflowexport.webp" alt="Flow missing export to logic app? Use the CLI for Microsoft 365" class="absolute inset-0 h-full w-full object-cover" loading="lazy">```
Manually changing the URL only solves the problem.
<!-- github-comment-id:932121559 -->
@appieschot just tested it in two different projects, should be fixed now. Would you be able to validate it on your end?
@appieschot just tested it in two different projects, should be fixed now. Would you be able to validate it on your end?
<!-- github-comment-id:932205176 -->
After updating the panel won't load anymore, anything else I need to update / check / change?
After updating the panel won't load anymore, anything else I need to update / check / change?

<!-- github-comment-id:932269851 -->
Ok, found it. Auto-import inserted something in the wrong order. Should be fixed in the next release which is currently publishing.
Ok, found it. Auto-import inserted something in the wrong order. Should be fixed in the next release which is currently publishing.
<!-- github-comment-id:932310386 -->
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.
Specify which field can be used for the preview image in the content type.
The issue raised by @appieschot on Twitter: https://twitter.com/appieschot/status/1443568883248492554?s=20
This will be supported in the upcoming release where you can specify in your content type image field that it can be used as the preview image with the
isPreviewImageproperty.@appieschot this is now available for testing in the https://beta.frontmatter.codes version
More information: https://beta.frontmatter.codes/docs/content-types#field-properties
Awesome work 🚀, two more questions though ;-):
@appieschot did you specify the
frontmatter.content.publicfoldersetting withstaticas value?https://frontmatter.codes/docs/settings#frontmatter.content.publicfolder
Yes, the preview itself shows on the left pane (see screenshot) but throws a image not found in the dashboard.
Part of the settings:
Would you be able to open the developer tools and check which URL of the image it tries to load?
Learned something new; didn't know it would be that easy.
Image on the left is rendered using:
<img src="https://file%2B.vscode-resource.vscode-webview.net/c%3A/git/sbx/weblog/static/wp-content/uploads/2021/cliflowexport.webp">The image in the dashboard is:
<img src="/wp-content/uploads/2021/cliflowexport.webp" alt="Flow missing export to logic app? Use the CLI for Microsoft 365" class="absolute inset-0 h-full w-full object-cover" loading="lazy">Manually changing the URL only solves the problem.
ok, know what the issue is 😀, will fix it
Will have a look at the code to see if I can help out next time as well 💪
@appieschot just tested it in two different projects, should be fixed now. Would you be able to validate it on your end?
After updating the panel won't load anymore, anything else I need to update / check / change?
Seems something went wrong during the build
Ok, found it. Auto-import inserted something in the wrong order. Should be fixed in the next release which is currently publishing.
Released and works again @appieschot 😁
Awesome works great! Can be closed out 🚀