Skip to content

Kirby 4.5.0

$site->hasImages()

Checks if the Files collection has any images

$site->hasImages(): bool

Return type

bool

Parent class

Kirby\Cms\Site

Example

<?php if($site->hasImages()): ?>
The /content folder contains images.
<?php endif ?>