Is there a way to control location of images from blocks?

I want to keep all the images used in the block ‘editor’ on the current page so that I can have 1 tab with all used images.

I tried using uploads and query (tried both with page and page.parent) but, unless I’m doing something wrong, I feel that’s not really doing what I expect.

So before Iook into this deeper, is it possible to use that kind of functionality on block images?

name: field.blocks.image.name
icon: image
preview: image
fields:
  location:
    label: Location image
    type: radio
    columns: 2
    default: "cms"
    options:
      cms: CMS
      web: Web
  image:
    label: Image
    type: files
    multiple: false
    image:
      back: black
    uploads:
      template: blocks/image
      parent: page
    query: page
    when:
      location: cms

Cheers,
Sam

By default, files are uploaded to the current page, so no extra setting necessary for the uploads.

query must return files, not a page:

query: page.images.template('image')