Reference

Guide

$file->toArray()

Extended info for the array export by injecting the information from the asset.

$file->toArray(): array

Return type

array

Example

if($image = $page->image()):
    var_dump($image->toArray());
endif;

Source code

kirby/src/Cms/File.php#L737