Sorry, we don't support your browser.  Install a modern browser

File Preview Panel components API#636

Maybe this is a bit far fetched, but let me explain:

I’m currently writing a Kirby plugin to connect Kirby with a service for hosting videos (Cloudflare Stream, Mux, etc.).

Since those providers use HLS streams, they require a custom media player component and can’t use the included HTML5 video player.

For Virtual files, it would be great to be able to be able to register a custom component that will be rendered by k-file-preview instead of the image focus picker or the icon. (This could also be used to solve https://kirby.nolt.io/555)

20 days ago

I would like to second that request. In our case, we’re not dealing with virtual files, just with different types like mbtiles for instance that would benefit from a map preview.

From our perspective,it would be cool, if there was a simple way to add custom previews, like a naming scheme for components, e. g. k-file-preview-{mimetype}. So the existing component register could be used for this without any additional configuration necessity. But this would only work for these simple use cases and not for the setup Tobias was talking about.

9 days ago

That’s better indeed!

9 days ago

The Vue side works quite well. But my question is what data those components would expect. Given that the preview data is quite hardcoded for images right now: https://github.com/getkirby/kirby/blob/main/src/Panel/File.php#L403-L437

5 days ago
5 days ago
Changed the status to
In progress
5 days ago