What is the intended behaviour of $files>keys()

In Kirby 3 when I use

<?php dump($page->find('gallery')->images()->keys()) ?>

I get:

    [0] => about/gallery/image1.jpg
    [1] => about/gallery/image2.jpg
    [2] => about/gallery/image3.jpg
    [3] => about/gallery/image4.jpg

i.e. the full path of the images.

Whereas in the documentation the example goes as follows

<?php dump($page->files()->keys()) ?>

i.e. the keys are without the path.

Maybe this is a previous behaviour? It also seems to be used that way in the gallery plugin that I was trying to adapt from Kirby2.
BTW it does not make a difference if the images are in the subfolder or directly in the page folder.

Any hints welcome.

PS: If the full path behaviour is the correct one, how could I obtain just the filename instead?

This would work:


The example in the docs sort of works, but only for the home page…

That does the trick! Thank you!