When an editor is selecting a component in CloudCannon, the icon from the component spec is used as the default thumbnail:
YAML
Copied to clipboard
spec:
icon: nature_people You can provide a custom image to use instead by placing a matching <component>.preview.<format>
file in your component directory. This will only be shown when adding new components to a page:
└── src
└── components
└── hero
├── hero.bookshop.yml
├── hero.astro
└── hero.preview.pngsrc
components
hero
- hero.bookshop.yml
- hero.astro
- hero.preview.png★
You can also specify a <component>.icon.<format> file, which will be shown alongside existing components
in CloudCannon's array view:
└── src
└── components
└── hero
├── hero.bookshop.yml
├── hero.astro
└── hero.icon.svgsrc
components
hero
- hero.bookshop.yml
- hero.astro
- hero.icon.svg★