I have the following page blueprint but as soon as I delete images, they are not deleted in the content folder and still will be rendered. Why?
label: add images
(I need type: files for the caption functionality)
The reason why it doesn’t work if you call
$page->images() is because
images() is a native Kirby page method, which fetches all files in the folder. If you don’t want to rename your field, you can fetch the selected files via the
$files = $page->content()->get('images')->toFiles();
// loop through files
Thanks @texnixe that makes sense!