Codex tools: Log in
Contents |
file_is_displayable_image determines whether or not the file passed to it is a displayable JPG, GIF, or PNG image.
<?php file_is_displayable_image($path); ?>
<?php file_is_displayable_image(ABSPATH . "/image/a-picture.jpg"); ?>