How to complete the data provided by $page->layout()

Hi there !

I’m trying to use Kirby as a headless CMS, with the beautiful layout feature.
I would like to complete my json object output to have more informations available in my frontend app (for example, specifics file fields).

For now I’m doing this :

$data = [
  // ...
  'layout' => json_decode($page->layout())
echo json_encode($data);

It retrieve me that :

  "content": {
    "images": [
  "id": "8f5b3051-213f-40b9-b913-6b8f15640bb8",
  "isHidden": false,
  "type": "gallery"

What’s the better way to get additionals images fields ? Let’s say a caption or differents preset urls for example…

Thank you !