$page->hasImages()

Checks if there are image files (jpg, png, gif, etc.) in the page directory

  • return (integer)

Example

<?php
echo $page->hasImages(); //returns the number of images in the folder

if($page->hasImages()) {
  $images = $page->images();
}
?>