$page->hasImages()
Checks if there are any image files (jpg, png, gif, etc.) in the page directory