I’m not quite sure what you mean by that – you want to set the query for the image field in the block preview, correct?
Check out the default image block (image | Kirby CMS) and how to extend blocks (Blocks | Kirby CMS) or, maybe that’s simpler, create your own custom block that simply contains an image field which queries from your album page (Blocks | Kirby CMS). If you want an image preview in the layout, I would suggest extending the default block.
You could have a look at what fields are contained in the default image block, so you can selectively hide them.
I would recommend creating a custom block type however, so you have complete control over what content you expect and how to render it. Creating custom blocks is pretty simple and straight forward, all you need is a blueprint, a template and a vue component (if you want to render content in the panel). Blocks | Kirby
Now… I must say I’m lost with vue component ! I have check this page : Blocks | Kirby which is great to explain for the button example. Yet, as you can see, I cannot achieve to adapt it to display the picture in the panel.
I have create the files in the directory for my feedimage custom block:
I have checked the link you gave me, with the orignal view component, yet I don’t know how to adapt it to my custom block, on what part I should copy and where…
Creating a custom block from scratch involves creating the component that goes with it to manage the preview.
But there is another approach that may be sufficient for you.
Extend a core block and modify it.
You create your custom block, you extend a core block (image, or gallery) and you delete the fields that do not interest you.
This way, the preview will continue to be managed by the core component and you will only have to create a blueprint and a snippet in your module.
No. Keep the layout method.
Create /site/blueprints/blocks/feedimages.yml and paste in your extends property AND your own fields.
Create /site/snippets/blocks/feedimages.php and use feedimages as a core block in your layout.fieldsets property.