Skip to content

Kirby 4.3.0

$hasfiles->image()

Returns a specific image by filename or the first one

$hasfiles->image(?string $filename = null): Kirby\Cms\File|null

Parameters

Name Type Default
$filename string|null null

Return type

Kirby\Cms\File|null

Parent class

Kirby\Cms\HasFiles