KQL: get image url in blocks

Hello,

maybe i am just blind for the solution, but here is my situation.

i use Kirby as headless and kql. Most of my pages work with layouts and custom blocks.
but the use of imgs in the blocks is a little tricky for my. because of the layout-structure i cannot use teh power of kql to define the select fields. therefor i only get the file-uuid as a result for img elements in the blocks.

as a first solution i add a “files” query in my page query to get beside the layout all files in the page in order to be able to search the file based on the uuid. that works until the moment some started to copy blocks form one page to another. at that moment the files do not longer belong to the current page. than i added a custom page method to get all files which are used in the page.

an now my question:
can i overwrite the custom kql answer in layouts->columns->blocks i order to geht beside the uuid of the file also the url an everything else which is defined in the file-blueprint? or is the custom page method the best solution?

here is my KQL Query.

return {
    query: 'page("home")',
    select: {
      id: true,
      title: true,
      intendedTemplate: true,
      layouts: 'page.layout.toLayouts',
      metaForm: true,
      footer: {
        query: 'page.footerelement.toPage',
        select: {
          layouts: 'page.layout.toLayouts',
        },
      },
      files: {
        query: 'page.files',
        select: {
          uuid: true,
          url: true,
          type: true,
          template: true,
          filename: true,
        },
      },
      allfiles: {
        query: 'page.allFiles',
      },
    },
  }
'pageMethods' => [
        /**
         * @kql-allowed
         */
        'allFiles' => function () {
            $fields = $this->blueprint()->fields();
            
            $regex = '/file:\/\/[A-Za-z0-9]+/i';
            $fileUuids = [];
            // loop through the field and fetch value from page
            foreach ($fields as $field) {
                $value = $this->{$field['name']}()->value();
                preg_match_all($regex, $value ?? '', $matches);
                $fileUuids = array_merge($fileUuids, $matches[0]);
            }

            $files = new Kirby\Cms\Files();
            $filesData = [];
            foreach (array_unique($fileUuids) as $uuid) {
                if ($file = $this->file($uuid)) {
                    $filesData[$uuid] = [
                        'uuid' => $uuid, 
                        'url' => $file->url(),
                        'type' => $file->type(),
                        'type' => $file->type(),
                        'template' => $file->template(),
                        'filename' => $file->filename(),
                    ];
                    $files->add($file);
                }
            }
            return $filesData;        
        }
    ],

Thanks in advance!