$file->isWebsafe()

Checks if the file is a jpg, png or gif

Example

<?php if($page->file()->isWebsafe()): ?>
The file is either a jpg, png or gif
<?php endif ?>