Front Matter CMS: debugging preview images in the dashboard
Define the preview image
Of course, Front Matter needs to know what image to use in the Dashboard. Explicitly define this in your frontmatter.jason
configuration, by adding a boolean isPreviewImage
flag to your article image front matter. For me, that looks like:
{
"title": "Hero Image",
"name": "hero",
"type": "image",
"isPreviewImage": true
}
Reference the Front Matter documentation on image fields for for more information.
Explicitly set your image path
Front Matter needs to know where your assets are stored. Define this using the frontmatter.content.publicFolder
setting in your frontmatter.jason
configuration. For Hugo, this is probably:
"frontMatter.framework.id": "hugo",
"frontMatter.content.publicFolder": "static",
publicFolder documentation has the details.
Clear the cache and reload the Dashboard
Front Matter: Clear cache
. That should be everything you need to see your article images load in the Dashboard.
Questions? Comments? Send me a note on Bluesky @nickgracilla.