Summery Summery
Validate that file is an image.
Syntax Syntax
Parameters Parameters
- $path
-
(Required) File path to test if valid image.
Return Return
(bool) True if valid image, false if not valid image.
Source Source
File: wp-admin/includes/image.php
function file_is_valid_image( $path ) { $size = @getimagesize( $path ); return ! empty( $size ); }
Advertisement
Changelog Changelog
Version | Description |
---|---|
2.5.0 | Introduced. |